From: James Morris <jmorris@redhat.com>

The patch below fixes a bug in the error handling code of
xprt_create_socket().  If sock_create() fails, we should not try and
release the non existent socket.

This fix is by James Carter <jwcart2@epoch.ncsc.mil>.


---

 net/sunrpc/xprt.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN net/sunrpc/xprt.c~xprt_create_socket-fix net/sunrpc/xprt.c
--- 25/net/sunrpc/xprt.c~xprt_create_socket-fix	2004-02-28 18:24:15.000000000 -0800
+++ 25-akpm/net/sunrpc/xprt.c	2004-02-28 18:24:15.000000000 -0800
@@ -1576,7 +1576,7 @@ xprt_create_socket(struct rpc_xprt *xprt
 
 	if ((err = sock_create(PF_INET, type, proto, &sock)) < 0) {
 		printk("RPC: can't create socket (%d).\n", -err);
-		goto failed;
+		return NULL;
 	}
 
 	/* If the caller has the capability, bind to a reserved port */

_