From: Jeffrey Altman Date: Mon, 4 Feb 2008 03:57:27 +0000 (+0000) Subject: STABLE14-kauth-windows-handle-leak-20080203 X-Git-Tag: openafs-stable-1_4_7pre1~44 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2614acaa520cdf154ca39497f234edc389850d0c;p=packages%2Fo%2Fopenafs.git STABLE14-kauth-windows-handle-leak-20080203 LICENSE MIT close() does not close sockets on Windows (cherry picked from commit f68eb88ac0af27371232903de837de57f0790056) --- diff --git a/src/kauth/krb_udp.c b/src/kauth/krb_udp.c index 1ed117ce7..3eb729b40 100644 --- a/src/kauth/krb_udp.c +++ b/src/kauth/krb_udp.c @@ -60,6 +60,9 @@ RCSID #define KDC_GEN_ERR 20 #endif +#ifndef AFS_NT40_ENV +#define closesocket close +#endif int krb_udp_debug = 0; @@ -892,11 +895,11 @@ SocketListener() } } if (sock_kerb >= 0) { - close(sock_kerb); + closesocket(sock_kerb); sock_kerb = -1; } if (sock_kerb5 >= 0) { - close(sock_kerb5); + closesocket(sock_kerb5); sock_kerb5 = -1; } printf("UDP SocketListener exiting due to error\n");