Subject: afs/net/rxrpc transport.c,1.6,1.7

From: [email-masked]
Date: Mon, 19 Jan 2004 09:58:52 +0000

Update of /home/cvs/afs/net/rxrpc
In directory phoenix.infradead.org:/tmp/cvs-serv28109/net/rxrpc

Modified Files:
	transport.c 
Log Message:
deal with transport initalisation failure correctly

Index: transport.c
===================================================================
RCS file: /home/cvs/afs/net/rxrpc/transport.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- transport.c	13 Aug 2003 10:05:27 -0000	1.6
+++ transport.c	19 Jan 2004 09:58:49 -0000	1.7
@@ -130,7 +130,19 @@
 	return 0;
 
  error:
-	rxrpc_put_transport(trans);
+	/* finish cleaning up the transport (not really needed here, but...) */
+	if (trans->socket)
+		trans->socket->ops->shutdown(trans->socket, 2);
+
+	/* close the socket */
+	if (trans->socket) {
+		trans->socket->sk->sk_user_data = NULL;
+		sock_release(trans->socket);
+		trans->socket = NULL;
+	}
+
+	kfree(trans);
+
 
 	_leave(" = %d", ret);
 	return ret;