Parent: 68506c3f10a90f8875816ba186f4067cb51d848d
Author: Szymon Janc <szymon.janc@tieto.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2012-12-03 13:02:47
Tree: 593da20c950497dcddaa9649c68ba516432ea333
rfkill: Fix memory leak in rfkill_exit 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. 120 bytes in 1 blocks are still reachable in loss record 181 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 0x167B8D: rfkill_init (rfkill.c:157) by 0x1215E4: main (main.c:540) 6 bytes in 1 blocks are still reachable in loss record 12 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 0x167B8D: rfkill_init (rfkill.c:157) by 0x1215E4: main (main.c:540)
Diffstat
| M | src/rfkill.c | | | 18 | ++++++++++- - - - - - - - |
1 files changed, 10 insertions(+), 8 deletions(-)