mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
55cdea9ed9
commit
18becbc547
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue