Commit d72e9eab authored by David King's avatar David King Committed by Paolo Bacchilega

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
parent 72a46499
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment