From: Chuck Lever Date: Mon, 7 Apr 2008 20:52:44 +0000 (-0400) Subject: SUNRPC: Fix a memory leak in rpc_create() X-Git-Tag: v2.6.25-rc9~34^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ed13c27e546667fb0967ae30f5070cd7f6455f90;p=linux-2.6-omap-h63xx.git SUNRPC: Fix a memory leak in rpc_create() Commit 510deb0d was supposed to move the xprt_create_transport() call in rpc_create(), but neglected to remove the old call site. This resulted in a transport leak after every rpc_create() call. This leak is present in 2.6.24 and 2.6.25. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 8c6a7f1a25e..8834d68972c 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -261,10 +261,6 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) }; char servername[48]; - xprt = xprt_create_transport(&xprtargs); - if (IS_ERR(xprt)) - return (struct rpc_clnt *)xprt; - /* * If the caller chooses not to specify a hostname, whip * up a string representation of the passed-in address.