[gnome-desktop/gnome-3-26] bg-slide-show: Plug a memory leak



commit f2aca1689bfbe5afaab019f292693ad232faa8c1
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Feb 26 19:39:06 2018 +0100

    bg-slide-show: Plug a memory leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793854

 libgnome-desktop/gnome-bg-slide-show.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-bg-slide-show.c b/libgnome-desktop/gnome-bg-slide-show.c
index b2c4f9b..d2e13c9 100644
--- a/libgnome-desktop/gnome-bg-slide-show.c
+++ b/libgnome-desktop/gnome-bg-slide-show.c
@@ -742,17 +742,20 @@ on_file_loaded (GFile        *file,
 
     if (!loaded) {
             g_task_return_error (task, error);
+            g_object_unref (task);
             return;
     }
 
     if (!parse_file_contents (g_task_get_source_object (task), contents, length, &error)) {
             g_task_return_error (task, error);
+            g_object_unref (task);
             g_free (contents);
             return;
     }
     g_free (contents);
 
     g_task_return_boolean (task, TRUE);
+    g_object_unref (task);
 }
 
 /**


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