nfsd: Fix leaked memory in nfs4_make_rec_clidname
Krishna Kumar [Mon, 20 Oct 2008 06:17:09 +0000 (11:17 +0530)]
cksum.data is not freed up in one error case. Compile tested.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

fs/nfsd/nfs4recover.c

index 0f9d6ef..74f7b67 100644 (file)
@@ -116,9 +116,9 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname)
 
        md5_to_hex(dname, cksum.data);
 
-       kfree(cksum.data);
        status = nfs_ok;
 out:
+       kfree(cksum.data);
        crypto_free_hash(desc.tfm);
 out_no_tfm:
        return status;