summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/content.c10
-rw-r--r--src/analysis/contents/memory.c2
2 files changed, 1 insertions, 11 deletions
diff --git a/src/analysis/content.c b/src/analysis/content.c
index 7208f94..6d8075c 100644
--- a/src/analysis/content.c
+++ b/src/analysis/content.c
@@ -77,20 +77,12 @@ static void g_binary_content_default_init(GBinContentInterface *iface)
void g_binary_content_set_attributes(GBinContent *content, GContentAttributes *attribs)
{
- GContentAttributes *old; /* Ancien jeu d'attributs */
GBinContentIface *iface; /* Interface utilisée */
iface = G_BIN_CONTENT_GET_IFACE(content);
- old = iface->get_attribs(content);
-
- if (old != NULL)
- g_object_unref(G_OBJECT(old));
-
iface->set_attribs(content, attribs);
- g_object_ref_sink(G_OBJECT(attribs));
-
}
@@ -115,8 +107,6 @@ GContentAttributes *g_binary_content_get_attributes(const GBinContent *content)
result = iface->get_attribs(content);
- g_object_ref(G_OBJECT(result));
-
return result;
}
diff --git a/src/analysis/contents/memory.c b/src/analysis/contents/memory.c
index 0b14a48..9ddc4fa 100644
--- a/src/analysis/contents/memory.c
+++ b/src/analysis/contents/memory.c
@@ -377,7 +377,7 @@ static void g_memory_content_set_attributes(GMemoryContent *content, GContentAtt
g_clear_object(&content->attribs);
content->attribs = attribs;
- g_object_unref(G_OBJECT(attribs));
+ g_object_ref(G_OBJECT(attribs));
}