summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4recover.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-03-07 13:10:03 +0300
committerJ. Bruce Fields <bfields@redhat.com>2016-03-17 21:57:15 +0300
commit956ccef3c97662c4ba07da9a19e4e62d3e286a8a (patch)
tree2ecbf7f9b141961789400ffb5529598677fe1021 /fs/nfsd/nfs4recover.c
parent2f6fc056e899bd0144a08da5cacaecbe8997cd74 (diff)
downloadlinux-956ccef3c97662c4ba07da9a19e4e62d3e286a8a.tar.xz
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;
}