[file-roller/gnome-3-16] Fix fr_window_add_to_recent_list memory leak



commit d72e9eab8de6434a3679b3ac6f9ef8620d86c7a7
Author: David King <dking redhat com>
Date:   Thu Jul 16 10:47:11 2015 +0100

    Fix fr_window_add_to_recent_list memory leak
    
    Found with Valgrind:
    
    ==9376== 19 bytes in 1 blocks are definitely lost in loss record 3,217
    of 17,916
    ==9376==    at 0x4C2BC50: malloc (in
    /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==9376==    by 0x748B689: g_malloc (gmem.c:97)
    ==9376==    by 0x74A425E: g_strdup (gstrfuncs.c:356)
    ==9376==    by 0x43C2AF: fr_window_add_to_recent_list (fr-window.c:2679)
    ==9376==    by 0x4457E0: _archive_operation_completed (fr-window.c:3019)
    ==9376==    by 0x4480BB: archive_list_ready_cb (fr-window.c:5881)
    ==9376==    by 0x6ED9ACC: g_simple_async_result_complete
    (gsimpleasyncresult.c:801)
    ==9376==    by 0x6ED9B3B: complete_in_idle_cb (gsimpleasyncresult.c:813)
    ==9376==    by 0x7485C89: g_main_dispatch (gmain.c:3122)
    ==9376==    by 0x7485C89: g_main_context_dispatch (gmain.c:3737)
    ==9376==    by 0x7486007: g_main_context_iterate.isra.29 (gmain.c:3808)
    ==9376==    by 0x74860AB: g_main_context_iteration (gmain.c:3869)
    ==9376==    by 0x6F0F5BB: g_application_run (gapplication.c:2311)
    ==9376==    by 0x414FE5: main (main.c:38)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752476

 src/fr-window.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 087d0af..9226c8c 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -2668,6 +2668,7 @@ fr_window_add_to_recent_list (FrWindow *window,
                recent_data->app_exec = "file-roller";
                gtk_recent_manager_add_full (gtk_recent_manager_get_default (), uri, recent_data);
 
+               g_free (recent_data->mime_type);
                g_free (recent_data);
        }
        else


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