From: Ursula Braun Date: Tue, 6 Jan 2009 02:07:46 +0000 (-0800) Subject: af_iucv: avoid left over IUCV connections from failing connects X-Git-Tag: v2.6.29-rc1~502^2~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=18becbc5479f88d5adc218374ca62b8b93ec2545;p=linux-2.6-omap-h63xx.git af_iucv: avoid left over IUCV connections from failing connects For certain types of AFIUCV socket connect failures IUCV connections are left over. Add some cleanup-statements to avoid cluttered IUCV connections. Signed-off-by: Ursula Braun Signed-off-by: David S. Miller --- diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 1077bc4e6e2..6b5f193e5f4 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -521,6 +521,13 @@ static int iucv_sock_connect(struct socket *sock, struct sockaddr *addr, release_sock(sk); return -ECONNREFUSED; } + + if (err) { + iucv_path_sever(iucv->path, NULL); + iucv_path_free(iucv->path); + iucv->path = NULL; + } + done: release_sock(sk); return err;