[file-roller] Fix memory leak in fr_window_change_action_state
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Fix memory leak in fr_window_change_action_state
- Date: Sun, 13 Dec 2015 14:09:43 +0000 (UTC)
commit 2b131a1c81417158ebf4afd5bbd0bc3aa441be85
Author: David King <dking redhat com>
Date: Thu Jul 16 10:45:41 2015 +0100
Fix memory leak in fr_window_change_action_state
Found with Valgrind:
==9376== 81 (40 direct, 41 indirect) bytes in 1 blocks are definitely
lost in loss record 12,551 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 0x74A24D2: g_slice_alloc (gslice.c:1007)
==9376== by 0x74C022C: g_variant_alloc (gvariant-core.c:476)
==9376== by 0x74C022C: g_variant_new_from_bytes (gvariant-core.c:512)
==9376== by 0x74B9766: g_variant_new_from_trusted (gvariant.c:295)
==9376== by 0x74B97DE: g_variant_new_boolean (gvariant.c:316)
==9376== by 0x43CACD: fr_window_change_action_state.constprop.63
(fr-window.c:724)
==9376== by 0x43CC96: fr_window_deactivate_filter (fr-window.c:1712)
==9376== by 0x43CC96: fr_window_update_current_location
(fr-window.c:1738)
==9376== by 0x441583: fr_window_construct (fr-window.c:5748)
==9376== by 0x441583: fr_window_new (fr-window.c:5796)
==9376== by 0x41C490: fr_application_command_line
(fr-application.c:588)
==9376== by 0xC750D2F: ffi_call_unix64 (in
/usr/lib64/libffi.so.6.0.2)
==9376== by 0xC75079A: ffi_call (in /usr/lib64/libffi.so.6.0.2)
==9376== by 0x71FAB94: g_cclosure_marshal_generic_va
(gclosure.c:1594)
==9376== by 0x71FA0C3: _g_closure_invoke_va (gclosure.c:864)
==9376== by 0x7213DD8: g_signal_emit_valist (gsignal.c:3246)
==9376== by 0x72148F1: g_signal_emit (gsignal.c:3393)
==9376== by 0x6F0CF82: g_application_call_command_line
(gapplication.c:953)
==9376== by 0x6F0F55F: g_application_run (gapplication.c:2292)
==9376== by 0x414FE5: main (main.c:38)
https://bugzilla.gnome.org/show_bug.cgi?id=752476
src/fr-window.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index a0b7377..087d0af 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -709,6 +709,8 @@ fr_window_change_action_state (FrWindow *window,
new_state = g_variant_new_boolean (value);
if ((old_state == NULL) || ! g_variant_equal (old_state, new_state))
g_action_change_state (action, new_state);
+ else
+ g_variant_unref (new_state);
if (old_state != NULL)
g_variant_unref (old_state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]