OSDN Git Service

Change behavior of automatic IPv4/IPv6 selection.
[ffftp/ffftp.git] / socketwrapper.c
index 6715131..79fbee4 100644 (file)
@@ -717,10 +717,11 @@ DWORD WINAPI WSAAsyncGetHostByNameIPv6ThreadProc(LPVOID lpParameter)
        }\r
        else\r
                PostMessage(pData->hWnd, pData->wMsg, (WPARAM)pData->h, (LPARAM)(ERROR_INVALID_FUNCTION << 16));\r
-       free(pData->name);\r
-       free(pData);\r
        // CreateThreadが返すハンドルが重複するのを回避\r
        Sleep(10000);\r
+       CloseHandle(pData->h);\r
+       free(pData->name);\r
+       free(pData);\r
        return 0;\r
 }\r
 \r