]> err.no Git - linux-2.6/commitdiff
[ACPI] drivers/acpi/hotkey.c: check kmalloc return value
authorIrwan Djajadi <irwan.djajadi@iname.com>
Fri, 20 Jan 2006 20:28:00 +0000 (15:28 -0500)
committerLen Brown <len.brown@intel.com>
Fri, 31 Mar 2006 06:02:39 +0000 (01:02 -0500)
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>
drivers/acpi/hotkey.c

index 2e2e4051dfa7abb0180023313b21303e248ac67a..c25b2b92edcf1e8a0281d12568301d360213fb6b 100644 (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;