Index: src/main/native/luni/windows/OSNetworkSystemWin32.c =================================================================== --- src/main/native/luni/windows/OSNetworkSystemWin32.c (revision 464915) +++ src/main/native/luni/windows/OSNetworkSystemWin32.c (working copy) @@ -257,13 +257,13 @@ send_buf = (struct ICMPHeader*)malloc(sizeof(char)*ICMP_SIZE); recv_buf = (struct IPHeader*)malloc(sizeof(char)*PACKET_SIZE); if (NULL == send_buf || NULL == recv_buf){ - goto cleanup; + goto cleanup1; } set_icmp_packet(send_buf, ICMP_SIZE); if(SOCKET_ERROR == sendto(sock, (char*)send_buf, ICMP_SIZE, 0, (struct sockaddr*)&dest, sizeof(dest))){ - goto cleanup; + goto cleanup1; } fdset_read = (fd_set *)malloc(sizeof (struct fd_set)); if (NULL == fdset_read){ @@ -297,6 +297,7 @@ ret = REACHABLE; cleanup: free(fdset_read); +cleanup1: free(send_buf); free(recv_buf); WSACleanup();