From: Ken Raeburn Date: Thu, 26 Feb 2004 00:38:01 +0000 (+0000) Subject: * sendto_kdc.c (start_connection): Close socket if connect() call fails for an X-Git-Tag: krb5-1.4-beta1~585 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=14d541f9a3e0a8763830590bc63da7f48077c606;p=krb5.git * 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 --- 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;