https://git.reactos.org/?p=reactos.git;a=commitdiff;h=68d94581ad181efe860a1…
commit 68d94581ad181efe860a168dc6938846c87638fc
Author: Jérôme Gardou <zefklop(a)users.noreply.github.com>
AuthorDate: Fri Apr 10 11:23:58 2020 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Fri Apr 10 12:06:53 2020 +0200
[IPHLPAPI] Do not use free() on buffer allocated with HeapAlloc
---
dll/win32/iphlpapi/iphlpapi_main.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/dll/win32/iphlpapi/iphlpapi_main.c b/dll/win32/iphlpapi/iphlpapi_main.c
index 8bcde12b52b..a9184b2739d 100644
--- a/dll/win32/iphlpapi/iphlpapi_main.c
+++ b/dll/win32/iphlpapi/iphlpapi_main.c
@@ -1060,7 +1060,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(),0, pOurTcpTable);
}
}
break;
@@ -1105,7 +1105,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1150,7 +1150,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1178,7 +1178,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1224,7 +1224,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1270,7 +1270,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1298,7 +1298,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_MODULE), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1344,7 +1344,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_MODULE), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1390,7 +1390,7 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_TCPROW_OWNER_MODULE), TcpTableSorter);
}
- free(pOurTcpTable);
+ HeapFree(GetProcessHeap(), 0, pOurTcpTable);
}
}
break;
@@ -1480,7 +1480,7 @@ DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_UDPROW), UdpTableSorter);
}
- free(pOurUdpTable);
+ HeapFree(GetProcessHeap(), 0, pOurUdpTable);
}
}
break;
@@ -1507,7 +1507,7 @@ DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_UDPROW_OWNER_PID), UdpTableSorter);
}
- free(pOurUdpTable);
+ HeapFree(GetProcessHeap(), 0, pOurUdpTable);
}
}
break;
@@ -1534,7 +1534,7 @@ DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize,
BOOL bOrder, U
sizeof(MIB_UDPROW_OWNER_MODULE), UdpTableSorter);
}
- free(pOurUdpTable);
+ HeapFree(GetProcessHeap(), 0, pOurUdpTable);
}
}
break;