changeset 6092:bc8119b0f297

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 0bb10924802a
children 386f40565f83
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	Thu Mar 14 16:59:06 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;
     }