[Xfce4-commits] [xfce/xfdesktop] 01/01: Don't free a passed in pointer

noreply at xfce.org noreply at xfce.org
Thu May 29 18:47:07 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit c2e627b4288ac6f459ea8428a4fa0bd83e804349
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Thu May 29 19:42:58 2014 +0300

    Don't free a passed in pointer
    
    xfce_backdrop_image_data_release tries to null a pointer given
    as argument after free. This patch fixes it by freeing the data
    in the calling functions.
---
 src/xfce-backdrop.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/xfce-backdrop.c b/src/xfce-backdrop.c
index 8989a65..948b447 100644
--- a/src/xfce-backdrop.c
+++ b/src/xfce-backdrop.c
@@ -1410,10 +1410,6 @@ xfce_backdrop_image_data_release(XfceBackdropImageData *image_data)
 
     if(image_data->loader)
         g_object_unref(image_data->loader);
-
-    g_free(image_data);
-    image_data = NULL;
-
 }
 
 /**
@@ -1584,6 +1580,7 @@ xfce_backdrop_loader_closed_cb(GdkPixbufLoader *loader,
     /* canceled? quit now */
     if(g_cancellable_is_cancelled(image_data->cancellable)) {
         xfce_backdrop_image_data_release(image_data);
+        g_free(image_data);
         return;
     }
 
@@ -1635,6 +1632,7 @@ xfce_backdrop_loader_closed_cb(GdkPixbufLoader *loader,
 
         backdrop->priv->image_data = NULL;
         xfce_backdrop_image_data_release(image_data);
+        g_free(image_data);
         return;
     }
 
@@ -1732,6 +1730,7 @@ xfce_backdrop_loader_closed_cb(GdkPixbufLoader *loader,
 
     backdrop->priv->image_data = NULL;
     xfce_backdrop_image_data_release(image_data);
+    g_free(image_data);
 }
 
 static void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list