Searched hist:"878215 fe" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/nfs/ |
H A D | proc.c | 878215fe Fri Dec 24 16:22:37 CST 2010 Jesper Juhl <jj@chaosbits.net> 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: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> 878215fe Fri Dec 24 16:22:37 CST 2010 Jesper Juhl <jj@chaosbits.net> 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: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
|