From 14d541f9a3e0a8763830590bc63da7f48077c606 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 26 Feb 2004 00:38:01 +0000 Subject: [PATCH] * sendto_kdc.c (start_connection): Close socket if connect() call fails for an unexpected reason. ticket: 2277 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16123 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/sendto_kdc.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index b014a098d..2890ccfc2 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +2004-02-25 Ken Raeburn + + * sendto_kdc.c (start_connection): Close socket if connect() call + fails for an unexpected reason. + 2004-02-13 Ken Raeburn * genaddrs.c: Don't specify defaults for diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index 4e9df2e3a..66a5a520f 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -564,6 +564,7 @@ start_connection (struct conn_state *state, struct select_state *selstate) state->state = CONNECTING; } else { dprint("connect failed: %m\n", SOCKET_ERRNO); + (void) closesocket(fd); state->err = SOCKET_ERRNO; state->state = FAILED; return -2; -- 2.26.2