From: Trond Myklebust Date: Fri, 3 Oct 2008 20:48:40 +0000 (-0400) Subject: SUNRPC: Fix a memory leak in rpcb_getport_async X-Git-Tag: v2.6.28-rc1~266^2^2~26 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=96165e2b7c4e2c82a0b60c766d4a2036444c21a0;p=linux-2.6-omap-h63xx.git SUNRPC: Fix a memory leak in rpcb_getport_async Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 172935b046d..0a22f00734a 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;