mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 19:31:09 +07:00
[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:
parent
ce362c0092
commit
1fee940349
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user