diff mbox

[1/4] acer-wmi: double free in acer_rfkill_exit()

Message ID 20090214095348.18550.46246.stgit@localhost (mailing list archive)
State Accepted
Headers show

Commit Message

Carlos Corbacho Feb. 14, 2009, 9:53 a.m. UTC
From: Dan Carpenter <error27@gmail.com>

This is acer_rfkill_exit() from drivers/platform/x86/acer-wmi.c.

The code frees wireless_rfkill->data again instead of
bluetooth_rfkill->data.

This was found using a code checker (http://repo.or.cz/w/smatch.git/).
Compile tested only, sorry.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

---

 0 files changed, 0 insertions(+), 0 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- orig/drivers/platform/x86/acer-wmi.c	2009-02-03 08:06:54.000000000 +0300
+++ devel/drivers/platform/x86/acer-wmi.c	2009-02-03 08:07:16.000000000 +0300
@@ -1026,7 +1026,7 @@ 
  	kfree(wireless_rfkill->data);
  	rfkill_unregister(wireless_rfkill);
  	if (has_cap(ACER_CAP_BLUETOOTH)) {
-		kfree(wireless_rfkill->data);
+		kfree(bluetooth_rfkill->data);
  		rfkill_unregister(bluetooth_rfkill);
  	}
  	return;