]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
remove potential file descriptor leak
authorMark Andrews <marka@isc.org>
Wed, 9 Jul 2003 03:28:44 +0000 (03:28 +0000)
committerMark Andrews <marka@isc.org>
Wed, 9 Jul 2003 03:28:44 +0000 (03:28 +0000)
lib/isc/win32/socket.c

index 25c00101a2b6f76d1dc50a59dafa1c458d75bc6b..fa9da80d866a3a702d63b52880a8d04ced5d8757 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.21 2002/08/06 03:32:53 mayer Exp $ */
+/* $Id: socket.c,v 1.22 2003/07/09 03:28:44 marka Exp $ */
 
 /* This code has been rewritten to take advantage of Windows Sockets
  * I/O Completion Ports and Events. I/O Completion Ports is ONLY
@@ -1805,6 +1805,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
        case isc_sockettype_udp:
                sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP);
                if (connection_reset_fix(sock->fd) != ISC_R_SUCCESS) {
+                       closesocket(sock->fd);
                        free_socket(&sock);
                        return (ISC_R_UNEXPECTED);
                }