[glib/glib-2-46] g_local_file_trash: remove invalid free call



commit 17177b81bf8b5be7121457c399e4b13cef0cfe34
Author: Sebastien Bacher <seb128 ubuntu com>
Date:   Fri Nov 6 17:42:45 2015 +0100

    g_local_file_trash: remove invalid free call
    
    Commit 8ece2de964c01b3428f16766f199b58f0bc67212 transplanted a block of
    code that contained an early-exit-on-error case which freed several
    variables.
    
    Because of the move, the normal-path unconditional free of one of these
    variables is now above this early exit case, so if this block is hit, it
    will now be a double-free.
    
    Remove that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757693

 gio/glocalfile.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 2ed6dff..cc9dc34 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -2140,7 +2140,6 @@ g_local_file_trash (GFile         *file,
 
       g_unlink (infofile);
 
-      g_free (topdir);
       g_free (trashname);
       g_free (infofile);
       g_free (trashfile);


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