summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-08-20 12:12:29 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-08-20 12:12:29 -0400
commit7653f6ff4ebab2a094e65b60fb19ee66ed2f78e7 (patch)
tree3f2fac3692634238832e213575350f5aeb854f30 /fs/nfs
parent12dfd080556124088ed61a292184947711b46cbe (diff)
NFSv4: Ensure that nfs4_alloc_client cleans up on error.
Any pointer that was allocated through nfs_alloc_client() needs to be freed via a call to nfs_free_client(). Reported-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index cbcdfaf3250..24eb663f8ed 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);
}