Skip to contentSkip to conversation

NFS: free client is case of idr allocation failure

PATCH New Stanislav Kinsbursky 1 participant 1 message Aug 20, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: free client is case of idr allocation failure

Simple kfree() is not enough, because we need to clean up the allocation of cl_hostname, put the module and the network namespace, etc

---
 fs/nfs/nfs4client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/nfs4client.c +1 -1
index cbcdfaf..24eb663 100644
@@ -74,7 +74,7 @@ struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init)
 	return clp;
 
 error:
-	kfree(clp);
+	nfs_free_client(clp);
 	return ERR_PTR(err);
 }