Commit: 3df40513d8c1dc331a4bc06a71620d3ec82e53ba
Parent: 9d91d1e767599b5ad9afacf9607f93a1cabdca68
Author: Szymon Janc <szymon.janc@tieto.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2012-12-03 13:03:00
Tree: 9eb8c40ecbe280ce8632b769118ca76a557c1283

hog: Fix memory leak in suspend-dummy g_io_add_watch increase channel ref count but g_io_channel_shutdown doesn't drop reference nor remove watch. Since close on unref is set for channel and it is watch we are interested keep watch id and not channel id and remove watch on exit. 6 bytes in 1 blocks are still reachable in loss record 11 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E942DD: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6CF95: g_io_channel_init (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB66FF: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDC5: fifo_open (suspend.c:109) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 16 bytes in 1 blocks are still reachable in loss record 45 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E93ABD: g_slist_prepend (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E78350: g_source_add_poll (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB5E32: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDF3: fifo_open (suspend.c:112) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 18 bytes in 1 blocks are still reachable in loss record 63 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E942DD: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E78A69: g_source_set_name (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB5E0B: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDF3: fifo_open (suspend.c:112) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 32 bytes in 1 blocks are still reachable in loss record 93 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E78722: g_source_set_callback (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6D0DB: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDF3: fifo_open (suspend.c:112) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 32 bytes in 1 blocks are still reachable in loss record 94 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E77285: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E775AF: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E78115: g_source_attach (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6D0E5: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDF3: fifo_open (suspend.c:112) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 120 bytes in 1 blocks are still reachable in loss record 177 of 235 at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB66F4: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDC5: fifo_open (suspend.c:109) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532) 120 bytes in 1 blocks are still reachable in loss record 178 of 235 at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4E7FAE0: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E78044: g_source_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB5DF9: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x18DDF3: fifo_open (suspend.c:112) by 0x18DF95: suspend_init (suspend.c:131) by 0x140B53: hog_init (hog_manager.c:133) by 0x17127B: plugin_init (plugin.c:217) by 0x1215D2: main (main.c:532)

Diffstat

M profiles/input/suspend-dummy.c | 38 +++++++++++++++++- - - - - - - - - - - - - - - - - - - - -

1 files changed, 17 insertions(+), 21 deletions(-)

View Full Diff | Patch