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



commit 436ca8f0797cbd1321893cdb8f6f1ee9cddfe42b
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 cb9b90b..c4674ba 100644
--- a/libgnome-desktop/gnome-bg-slide-show.c
+++ b/libgnome-desktop/gnome-bg-slide-show.c
@@ -741,17 +741,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]