Skip to content

Commit

Permalink
nfsd: recover: fix memory leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and J. Bruce Fields committed Mar 17, 2016
1 parent 2f6fc05 commit 956ccef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfsd/nfs4recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 956ccef

Please sign in to comment.