changeset 7940:b5bef1f71de6

8008804: file descriptor leak in src/windows/native/java/net/DualStackPlainSocketImpl.c Reviewed-by: alanb, chegar, dsamersoff
author jzavgren
date Tue, 05 Mar 2013 14:30:18 +0000
parents 62639ca66ab9
children be79440b8026
files src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/java/net/DualStackPlainDatagramSocketImpl.c	Tue Mar 05 10:10:55 2013 +0000
+++ b/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;
     }