Thread (10 messages) 10 messages, 2 authors, 2012-11-30
STALE4982d

[PATCH v2 8/8] hog: Fix unregistering profile on exit

From: Szymon Janc <hidden>
Date: 2012-11-30 12:57:44
Subsystem: the rest · Maintainer: Linus Torvalds

On exit should call btd_profile_unregister instead of
btd_profile_register. Fixes following:

16 bytes in 1 blocks are still reachable in loss record 54 of 215
   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 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x17F6C2: btd_profile_register (profile.c:533)
   by 0x171456: plugin_cleanup (plugin.c:242)
   by 0x12164F: main (main.c:563)

16 bytes in 1 blocks are still reachable in loss record 37 of 215
   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 0x4E93FC2: g_slist_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x17F6C2: btd_profile_register (profile.c:533)
   by 0x1712EB: plugin_init (plugin.c:217)
   by 0x1215D2: main (main.c:544)
---
 profiles/input/hog_manager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/input/hog_manager.c b/profiles/input/hog_manager.c
index 21ceb79..595b160 100644
--- a/profiles/input/hog_manager.c
+++ b/profiles/input/hog_manager.c
@@ -144,7 +144,7 @@ static void hog_manager_exit(void)
 	if (suspend_supported)
 		suspend_exit();
 
-	btd_profile_register(&hog_profile);
+	btd_profile_unregister(&hog_profile);
 }
 
 static int hog_init(void)
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help