background: Fix memory leak in XML signal handling
When emitted in an idle, the item was correctly unref'ed, but not when emitting the signal straight away. https://bugzilla.gnome.org/show_bug.cgi?id=709243
This commit is contained in:
parent
a0ab6d527f
commit
b9e3603ba4
1 changed files with 1 additions and 0 deletions
|
@ -316,6 +316,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
|
||||||
emit_added_in_idle (xml, g_object_ref (item));
|
emit_added_in_idle (xml, g_object_ref (item));
|
||||||
else
|
else
|
||||||
g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
|
g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
|
||||||
|
g_object_unref (item);
|
||||||
retval = TRUE;
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue