Skip to content

Commit

Permalink
acer-wmi: double free in acer_rfkill_exit()
Browse files Browse the repository at this point in the history
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/).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Dan Carpenter authored and Len Brown committed Mar 16, 2009
1 parent d263da3 commit 013d67f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static void acer_rfkill_exit(void)
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;
Expand Down

0 comments on commit 013d67f

Please sign in to comment.