Skip to content

Commit

Permalink
SUNRPC: Fix a memory leak in rpc_create()
Browse files Browse the repository at this point in the history
Commit 510deb0 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 <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Apr 9, 2008
1 parent 240ee83 commit ed13c27
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ed13c27

Please sign in to comment.