Only memset the memory if we get a valid pointer. Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- compat/compat-2.6.37.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/compat/compat-2.6.37.c b/compat/compat-2.6.37.c index c49efea..8698e1d 100644 --- 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); -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html