[patch] Staging: speakup: free after input_unregister_device()

Dan Carpenter error27 at gmail.com
Fri Nov 12 05:08:35 UTC 2010


input_unregister_device() frees the device so the call to
input_free_device() is a double free.

Signed-off-by: Dan Carpenter <error27 at gmail.com>

diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c
index adb93f2..65b2311 100644
--- a/drivers/staging/speakup/fakekey.c
+++ b/drivers/staging/speakup/fakekey.c
@@ -62,7 +62,6 @@ void speakup_remove_virtual_keyboard(void)
 {
 	if (virt_keyboard != NULL) {
 		input_unregister_device(virt_keyboard);
-		input_free_device(virt_keyboard);
 		virt_keyboard = NULL;
 	}
 }



More information about the devel mailing list