projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37ffaa7
)
compat: handle fail of vmalloc()
author
Hauke Mehrtens
<hauke@hauke-m.de>
Wed, 27 Apr 2011 19:01:22 +0000
(21:01 +0200)
committer
Luis R. Rodriguez
<lrodriguez@atheros.com>
Wed, 27 Apr 2011 19:56:49 +0000
(12:56 -0700)
Only memset the memory if we get a valid pointer.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/compat-2.6.37.c
patch
|
blob
|
history
diff --git
a/compat/compat-2.6.37.c
b/compat/compat-2.6.37.c
index c49efeaf26e18af32af16aa229b9b25aff2b3761..8698e1dcbf0ffd3babeefeea472eaf6f7bf12bf0 100644
(file)
--- a/
compat/compat-2.6.37.c
+++ b/
compat/compat-2.6.37.c
@@
-348,7
+348,8
@@
void *vzalloc(unsigned long size)
{
void *buf;
buf = vmalloc(size);
- memset(buf, 0, size);
+ if (buf)
+ memset(buf, 0, size);
return buf;
}
EXPORT_SYMBOL(vzalloc);