[Patch] fs/binfmt_elf.c: fix a wrong free
authorWANG Cong <xiyou.wangcong@gmail.com>
Tue, 6 May 2008 04:45:35 +0000 (12:45 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 16 May 2008 21:22:58 +0000 (17:22 -0400)
commit5f719558edf9c84bfbb1f7ad37e84c483282d09f
treeacbd9ec7343ad6d7933015c40b0acf378a2d2418
parenteceea0b3df05ed262ae32e0c6340cc7a3626632d
[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: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
--
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/binfmt_elf.c