[glib] g_file_copy: plug a leak



commit 039ecf2bc613ea5687d1052a87c982163e506451
Author: Dan Winship <danw gnome org>
Date:   Fri Aug 24 17:08:38 2012 -0400

    g_file_copy: plug a leak
    
    The fallback copy code was leaking the GFileInfo if it didn't have
    G_FILE_ATTRIBUTE_STANDARD_TYPE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682560

 gio/gfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/gfile.c b/gio/gfile.c
index d7af16c..c2ae242 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -2534,6 +2534,7 @@ open_source_for_copy (GFile           *source,
           /* Error getting info from target, return that error
            * (except for NOT_FOUND, which is no error here)
            */
+          g_clear_object (&info);
           if (my_error != NULL && !g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
             {
               g_propagate_error (error, my_error);



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