From a0e7e3cf7932d6c77de0dc79a40dbaeb8060b544 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Sat, 26 Mar 2011 02:24:35 -0400 Subject: NFS: Don't leak RPC clients in NFSv4 secinfo negotiation Signed-off-by: Trond Myklebust --- fs/nfs/namespace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/nfs') diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index ad92bf731ff..9166fcb66da 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -192,13 +192,15 @@ static rpc_authflavor_t nfs_lookup_with_sec(struct nfs_server *server, struct de auth = rpcauth_create(flavor, clone); if (!auth) { flavor = -EIO; - goto out; + goto out_shutdown; } err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode, &path->dentry->d_name, fh, fattr); if (err < 0) flavor = err; +out_shutdown: + rpc_shutdown_client(clone); out: return flavor; } -- cgit v1.2.3-70-g09d2