[gnome-control-center] background: Fix memory leaks in slideshow handling



commit a0ab6d527f9a06494872198f2cbbd334b7ee315b
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 2 16:31:25 2013 +0200

    background: Fix memory leaks in slideshow handling
    
    A string was leaked when loading the name of the slideshow,
    and a file object was left lingering as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709243

 panels/background/cc-background-xml.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/background/cc-background-xml.c b/panels/background/cc-background-xml.c
index d23afbc..520d647 100644
--- a/panels/background/cc-background-xml.c
+++ b/panels/background/cc-background-xml.c
@@ -291,6 +291,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
                g_object_unref (item);
                continue;
              }
+           g_object_unref (file);
          }
       }
 
@@ -298,6 +299,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
        * need to use proper code here */
       uri = g_filename_to_uri (filename, NULL, NULL);
       id = g_strdup_printf ("%s#%s", uri, cname);
+      g_free (cname);
       g_free (uri);
 
       /* Make sure we don't already have this one and that filename exists */


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