Commit 57c08314 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] NFS SUNRPC fix

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>.
parent 348a16e2
...@@ -1589,7 +1589,7 @@ xprt_create_socket(int proto, struct rpc_timeout *to, int resvport) ...@@ -1589,7 +1589,7 @@ xprt_create_socket(int proto, struct rpc_timeout *to, int resvport)
if ((err = sock_create(PF_INET, type, proto, &sock)) < 0) { if ((err = sock_create(PF_INET, type, proto, &sock)) < 0) {
printk("RPC: can't create socket (%d).\n", -err); printk("RPC: can't create socket (%d).\n", -err);
goto failed; return NULL;
} }
/* If the caller has the capability, bind to a reserved port */ /* If the caller has the capability, bind to a reserved port */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment