From: Trond Myklebust Date: Thu, 18 Oct 2007 23:59:20 +0000 (-0400) Subject: NFSv4: Fix an rpc_cred reference leakage in fs/nfs/delegation.c X-Git-Tag: v2.6.24-rc1~133^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=603c83da19cf42d0f94022ac2fa389a431e32b84;p=linux-2.6 NFSv4: Fix an rpc_cred reference leakage in fs/nfs/delegation.c Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index af8b235d40..11833f4cae 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -168,7 +168,8 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct spin_unlock(&inode->i_lock); spin_unlock(&clp->cl_lock); - kfree(delegation); + if (delegation != NULL) + nfs_free_delegation(delegation); return status; }