8008804: file descriptor leak in src/windows/native/java/net/DualStackPlainSocketImpl.c
authorjzavgren
Tue, 05 Mar 2013 14:30:18 +0000
changeset 16054 a7cdb40ea8e8
parent 16053 84f0b1cce029
child 16055 311a101eb72c
8008804: file descriptor leak in src/windows/native/java/net/DualStackPlainSocketImpl.c Reviewed-by: alanb, chegar, dsamersoff
jdk/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c
--- a/jdk/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c	Tue Mar 05 10:10:55 2013 +0000
+++ b/jdk/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c	Tue Mar 05 14:30:18 2013 +0000
@@ -89,6 +89,7 @@
     rv = setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &opt, sizeof(opt));
     if (rv == SOCKET_ERROR) {
         NET_ThrowNew(env, WSAGetLastError(), "Socket creation failed");
+        closesocket(fd);
         return -1;
     }