Skip to contentSkip to conversation

SUNRPC: Fix memory leak introduced by commit 510deb0d

PATCH In review Chuck Lever 2 participants 2 messages Apr 8, 2008 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: Fix memory leak introduced by commit 510deb0d

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.

---
Resending...

 net/sunrpc/clnt.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
net/sunrpc/clnt.c +0 -4
index d0f04c8..dd39a39 100644
@@ -260,10 +260,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.

A message that is not in the archive (sent off-list or not yet received): 20080408144713.20422.40323.stgit-meopP2rzCrTwdl/1UfZZQIVfYA8g3rJ/@public.gmane.org

#2 lore raw
Quoted 5 lines · Chuck Lever

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.

Argh. I'll pass that on asap...

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com