[gnome-control-center] background: Fix memory leak in XML signal handling



commit b9e3603ba4d6b494c0659cbc0196ef9f81fa6a60
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 2 18:15:25 2013 +0200

    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

 panels/background/cc-background-xml.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index 520d647..868d19d 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -316,6 +316,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
         emit_added_in_idle (xml, g_object_ref (item));
       else
         g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
+      g_object_unref (item);
       retval = TRUE;
     }
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]