]> err.no Git - linux-2.6/commit
ACPI: hotkey.c fixes, fix for potential crash of hotkey.c
authorHandle X <xhandle@gmail.com>
Tue, 15 Aug 2006 05:37:27 +0000 (22:37 -0700)
committerLen Brown <len.brown@intel.com>
Wed, 16 Aug 2006 22:08:06 +0000 (18:08 -0400)
commit5672bde6355f2d12c49df1eec083d25afe489063
tree9e4713a72b26b0b92d2a381a65dbdc83abd0e621
parent9f737633e6ee54fc174282d49b2559bd2208391d
ACPI: hotkey.c fixes, fix for potential crash of hotkey.c

While going through the code, I found out some memory leaks and potential
crashes in drivers/acpi/hotkey.c Please find the patch to fix them.

This patch does the following,

1. Fixes memory leaks in error paths of hotkey_write_config

2. Fixes freeing unallocated pointers in the error paths of hotkey_write_config

3. Uses a loop instead of linear searching for parsing the userspace
   input in get_params

4. Uses array of char * instead of passing 4 pointer parameters
   explicitly into the init_{poll_}hotkey_* static functions

Signed-off-by: Andrew Morton <akpm@osdl.org>
Acked-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/hotkey.c