summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-10-03 16:48:40 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-10-07 18:18:57 -0400
commit96165e2b7c4e2c82a0b60c766d4a2036444c21a0 (patch)
tree8adfc4f16a674671671d8bb27270feb84400260f /net/sunrpc
parent9a4bd29fe8f6d3f015fe1c8e5450eb62cfebfcc9 (diff)
downloadlinux-96165e2b7c4e2c82a0b60c766d4a2036444c21a0.tar.gz
linux-96165e2b7c4e2c82a0b60c766d4a2036444c21a0.tar.xz
SUNRPC: Fix a memory leak in rpcb_getport_async
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/rpcb_clnt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 172935b046de..0a22f00734a4 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -580,7 +580,7 @@ void rpcb_getport_async(struct rpc_task *task)
status = -ENOMEM;
dprintk("RPC: %5u %s: no memory available\n",
task->tk_pid, __func__);
- goto bailout_nofree;
+ goto bailout_release_client;
}
map->r_prog = clnt->cl_prog;
map->r_vers = clnt->cl_vers;
@@ -605,6 +605,8 @@ void rpcb_getport_async(struct rpc_task *task)
rpc_put_task(child);
return;
+bailout_release_client:
+ rpc_release_client(rpcb_clnt);
bailout_nofree:
rpcb_wake_rpcbind_waiters(xprt, status);
task->tk_status = status;