Commit 18becbc5479f88d5adc218374ca62b8b93ec2545

Authored by Ursula Braun
Committed by David S. Miller
1 parent 55cdea9ed9

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>

Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff

... ... @@ -521,6 +521,13 @@
521 521 release_sock(sk);
522 522 return -ECONNREFUSED;
523 523 }
  524 +
  525 + if (err) {
  526 + iucv_path_sever(iucv->path, NULL);
  527 + iucv_path_free(iucv->path);
  528 + iucv->path = NULL;
  529 + }
  530 +
524 531 done:
525 532 release_sock(sk);
526 533 return err;