OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] NFS: free client is case of idr allocation failure
[PATCH] NFS: free client is case of idr allocation failure [message #47629] Mon, 20 August 2012 16:17
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
Simple kfree() is not enough, because we need to clean up the allocation of
cl_hostname, put the module and the network namespace, etc

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
fs/nfs/nfs4client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index cbcdfaf..24eb663 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -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);
}
 
Read Message
Previous Topic: [PATCH] NFS: put net in case of idr allocation failure
Next Topic: [PATCH v3] SUNRPC: protect service sockets lists during per-net shutdown
Goto Forum:
  


Current Time: Wed Aug 07 20:28:15 GMT 2024

Total time taken to generate the page: 0.02762 seconds