From: Irwan Djajadi Date: Fri, 20 Jan 2006 20:28:00 +0000 (-0500) Subject: [ACPI] drivers/acpi/hotkey.c: check kmalloc return value X-Git-Tag: v2.6.18-rc1~1081^2~19^2~13^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6;p=linux-2.6 [ACPI] drivers/acpi/hotkey.c: check kmalloc return value Signed-off-by: Irwan Djajadi Signed-off-by: Alexey Dobriyan Signed-off-by: Len Brown --- diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c index 2e2e4051df..c25b2b92ed 100644 --- a/drivers/acpi/hotkey.c +++ b/drivers/acpi/hotkey.c @@ -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;