Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758164AbZAaCvj (ORCPT ); Fri, 30 Jan 2009 21:51:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754776AbZAaCqr (ORCPT ); Fri, 30 Jan 2009 21:46:47 -0500 Received: from kroah.org ([198.145.64.141]:54838 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754697AbZAaCqp (ORCPT ); Fri, 30 Jan 2009 21:46:45 -0500 Date: Fri, 30 Jan 2009 18:40:09 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Trond Myklebust Subject: [patch 13/32] SUNRPC: Fix a memory leak in rpcb_getport_async Message-ID: <20090131024009.GN12147@kroah.com> References: <20090131023411.032399235@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="sunrpc-fix-a-memory-leak-in-rpcb_getport_async.patch" In-Reply-To: <20090131023906.GA12147@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1253 Lines: 41 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Trond Myklebust commit 96165e2b7c4e2c82a0b60c766d4a2036444c21a0 upstream. Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- net/sunrpc/rpcb_clnt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -558,7 +558,7 @@ void rpcb_getport_async(struct rpc_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; @@ -583,6 +583,8 @@ void rpcb_getport_async(struct rpc_task task->tk_xprt->stat.bind_count++; return; +bailout_release_client: + rpc_release_client(rpcb_clnt); bailout_nofree: rpcb_wake_rpcbind_waiters(xprt, status); task->tk_status = status; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/