summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrwan Djajadi <irwan.djajadi@iname.com>2006-01-20 15:28:00 -0500
committerLen Brown <len.brown@intel.com>2006-03-31 01:02:39 -0500
commit1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6 (patch)
tree2fb60f5c2462654b88764bdf7acfa63a3aa6f4a0
parentce362c009250340358a7221f3cdb7954cbf19c01 (diff)
downloadblackbird-op-linux-1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6.tar.gz
blackbird-op-linux-1fee94034917aa711fcbd4ebf4c36f7ebd9fa7d6.zip
[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>
-rw-r--r--drivers/acpi/hotkey.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index 2e2e4051dfa7..c25b2b92edcf 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;
OpenPOWER on IntegriCloud