Commit 1fee9403 authored by Irwan Djajadi's avatar Irwan Djajadi Committed by Len Brown

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

Signed-off-by: default avatarIrwan Djajadi <irwan.djajadi@iname.com>
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent ce362c00
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment