Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357548

Re: [PATCH] nfsd: recover: fix memory leak

From "J. Bruce Fields" <bfields@fieldses.org>
Newsgroups linux.kernel
Subject Re: [PATCH] nfsd: recover: fix memory leak
Date 2016-03-14 19:50 +0100
Message-ID <rcFJ0-7Cy-13@gated-at.bofh.it> (permalink)
References <ra0qC-1wR-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Mar 07, 2016 at 03:40:03PM +0530, Sudip Mukherjee wrote:
> nfsd4_cltrack_grace_start() will allocate the memory for grace_start but
> when we returned due to error we missed freeing it.

Thanks, applying for 4.6.--b.

> 
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>  fs/nfsd/nfs4recover.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 195fe26..66eaeb1 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -1266,6 +1266,7 @@ nfsd4_umh_cltrack_init(struct net *net)
>  	/* XXX: The usermode helper s not working in container yet. */
>  	if (net != &init_net) {
>  		pr_warn("NFSD: attempt to initialize umh client tracking in a container ignored.\n");
> +		kfree(grace_start);
>  		return -EINVAL;
>  	}
>  
> -- 
> 1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] nfsd: recover: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-03-07 11:20 +0100
  Re: [PATCH] nfsd: recover: fix memory leak "J. Bruce Fields" <bfields@fieldses.org> - 2016-03-14 19:50 +0100

csiph-web