Skip to content
Commit 5f719558 authored by WANG Cong's avatar WANG Cong Committed by Al Viro
Browse files

[Patch] fs/binfmt_elf.c: fix a wrong free



In kmalloc failing path, we shouldn't free pointers in 'info',
because the struct 'info' is uninitilized when kmalloc is called.

And when kmalloc returns NULL, it's needless to kfree it.

Signed-off-by: default avatarWANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Reviewed-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>

--
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent eceea0b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment