projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b99e194
)
staging: hv: check kzalloc() result
author
Kulikov Vasiliy
<segooon@gmail.com>
Fri, 16 Jul 2010 16:13:51 +0000
(20:13 +0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 22 Jul 2010 21:33:00 +0000
(14:33 -0700)
If kzalloc() fails free allocated resources and exit.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/channel.c
patch
|
blob
|
history
diff --git
a/drivers/staging/hv/channel.c
b/drivers/staging/hv/channel.c
index
f047c5a
..
78d1aa5
100644
(file)
--- a/
drivers/staging/hv/channel.c
+++ b/
drivers/staging/hv/channel.c
@@
-465,6
+465,8
@@
static int VmbusChannelCreateGpadlHeader(void *Kbuffer, u32 Size,
sizeof(struct vmbus_channel_gpadl_header) +
sizeof(struct gpa_range) + pageCount * sizeof(u64);
msgHeader = kzalloc(msgSize, GFP_KERNEL);
+ if (msgHeader == NULL)
+ goto nomem;
msgHeader->MessageSize = msgSize;
gpaHeader = (struct vmbus_channel_gpadl_header *)msgHeader->Msg;