[ACPI] drivers/acpi/hotkey.c: check kmalloc return value

Signed-off-by: Irwan Djajadi <irwan.djajadi@iname.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Irwan Djajadi 2006-01-20 15:28:00 -05:00 committed by Len Brown
parent ce362c0092
commit 1fee940349
1 changed files with 2 additions and 0 deletions

View File

@ -723,6 +723,8 @@ get_parms(char *config_record,
goto do_fail;
count = tmp1 - tmp;
*action_handle = (char *)kmalloc(count + 1, GFP_KERNEL);
if (!*action_handle)
goto do_fail;
strncpy(*action_handle, tmp, count);
*(*action_handle + count) = 0;