file-info: Don't leak the filename if thumbnailing failed
authorDebarshi Ray <debarshir@gnome.org>
Mon, 19 Nov 2012 23:11:56 +0000 (00:11 +0100)
committerDebarshi Ray <debarshir@gnome.org>
Mon, 19 Nov 2012 23:24:52 +0000 (00:24 +0100)
Fixes: https://bugzilla.gnome.org/686895

gio/glocalfileinfo.c

index 306fb58..9c97495 100644 (file)
@@ -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",