Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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

parent ce362c00
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;