summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorUrsula Braun <ursula.braun@de.ibm.com>2009-01-05 18:07:46 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-05 18:07:46 -0800
commit18becbc5479f88d5adc218374ca62b8b93ec2545 (patch)
treec99569ff4d63df5cef410152fbb83d74c683f8be /net
parent55cdea9ed9cf2d76993e40ed7a1fc649a14db07c (diff)
downloadlinux-exynos-18becbc5479f88d5adc218374ca62b8b93ec2545.tar.gz
linux-exynos-18becbc5479f88d5adc218374ca62b8b93ec2545.tar.bz2
linux-exynos-18becbc5479f88d5adc218374ca62b8b93ec2545.zip
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 <ursula.braun@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/iucv/af_iucv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 1077bc4e6e2a..6b5f193e5f48 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;