[ICMP]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 12 May 2014 06:44:01 +0000 (06:44 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 12 May 2014 06:44:01 +0000 (06:44 +0000)
- Fix socket leak. Spotted by Samuel & cppcheck
Note: Wine has this in iphlpapi these days. Should probably sync.
CORE-8208 #resolve

svn path=/trunk/; revision=63250

reactos/dll/win32/icmp/icmp_main.c

index 8257c11..187b310 100644 (file)
@@ -179,6 +179,7 @@ HANDLE WINAPI IcmpCreateFile(VOID)
 
     icp=HeapAlloc(GetProcessHeap(), 0, sizeof(*icp));
     if (icp==NULL) {
+        closesocket(sid);
         SetLastError(IP_NO_RESOURCES);
         return INVALID_HANDLE_VALUE;
     }