[glib] file-info: Don't leak the filename if thumbnailing failed



commit 51d083010286cb4bdc0d7b0b2323e25a94115087
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 20 00:11:56 2012 +0100

    file-info: Don't leak the filename if thumbnailing failed
    
    Fixes: https://bugzilla.gnome.org/686895

 gio/glocalfileinfo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 306fb58..9c97495 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1308,6 +1308,7 @@ get_thumbnail_attributes (const char *path,
         _g_file_info_set_attribute_byte_string_by_id (info, G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH, filename);
       else
         {
+          g_free (filename);
           filename = g_build_filename (g_get_user_cache_dir (),
                                        "thumbnails", "fail",
                                        "gnome-thumbnail-factory",



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