summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4recover.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-03-07 15:40:03 +0530
committerJ. Bruce Fields <bfields@redhat.com>2016-03-17 14:57:15 -0400
commit956ccef3c97662c4ba07da9a19e4e62d3e286a8a (patch)
tree2ecbf7f9b141961789400ffb5529598677fe1021 /fs/nfsd/nfs4recover.c
parent2f6fc056e899bd0144a08da5cacaecbe8997cd74 (diff)
downloadlinux-956ccef3c97662c4ba07da9a19e4e62d3e286a8a.tar.gz
linux-956ccef3c97662c4ba07da9a19e4e62d3e286a8a.tar.bz2
linux-956ccef3c97662c4ba07da9a19e4e62d3e286a8a.zip
nfsd: recover: fix memory leak
nfsd4_cltrack_grace_start() will allocate the memory for grace_start but when we returned due to error we missed freeing it. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r--fs/nfsd/nfs4recover.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index dc8ebecf5618..a8d6a83d4216 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -1260,6 +1260,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;
}