Эх сурвалжийг харах

NFSv4: Fix an rpc_cred reference leakage in fs/nfs/delegation.c

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust 17 жил өмнө
parent
commit
603c83da19
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      fs/nfs/delegation.c

+ 2 - 1
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;
 }