Skip to content
Commit 878215fe authored by Jesper Juhl's avatar Jesper Juhl Committed by Trond Myklebust
Browse files

NFS: Don't leak in nfs_proc_symlink()



Hi,

In fs/nfs/proc.c::nfs_proc_symlink() we will leak memory if either
nfs_alloc_fhandle() or nfs_alloc_fattr() returns NULL but the other one
doesn't.
This patch ensures memory allocated by one when the other fails is always
released (this is safe since nfs_free_fattr() and nfs_free_fhandle() both
call kfree which deals gracefully with NULL pointers).

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 1174dd1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment