https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d76ac645e8ca4d6deb0c6…
commit d76ac645e8ca4d6deb0c673400da74069505ce7b
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Nov 24 20:34:20 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Nov 24 21:41:09 2018 +0100
[IPHLPAPI] Don't leak memory
---
dll/win32/iphlpapi/iphlpapi_main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/dll/win32/iphlpapi/iphlpapi_main.c b/dll/win32/iphlpapi/iphlpapi_main.c
index 2792be25a0..404c1b7851 100644
--- a/dll/win32/iphlpapi/iphlpapi_main.c
+++ b/dll/win32/iphlpapi/iphlpapi_main.c
@@ -876,6 +876,8 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL
bOrder, U
qsort(pTheirTcpTable->table, pTheirTcpTable->dwNumEntries,
sizeof(MIB_TCPROW), TcpTableSorter);
}
+
+ free(pOurTcpTable);
}
}
break;
@@ -918,6 +920,8 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL
bOrder, U
qsort(pTheirTcpTable->table, pTheirTcpTable->dwNumEntries,
sizeof(MIB_TCPROW), TcpTableSorter);
}
+
+ free(pOurTcpTable);
}
}
break;
@@ -943,6 +947,8 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL
bOrder, U
qsort(pTheirTcpTable->table, pTheirTcpTable->dwNumEntries,
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
+
+ free(pOurTcpTable);
}
}
break;
@@ -986,6 +992,8 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL
bOrder, U
qsort(pTheirTcpTable->table, pTheirTcpTable->dwNumEntries,
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
+
+ free(pOurTcpTable);
}
}
break;
@@ -1029,6 +1037,8 @@ DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize,
BOOL bOrder, U
qsort(pTheirTcpTable->table, pTheirTcpTable->dwNumEntries,
sizeof(MIB_TCPROW_OWNER_PID), TcpTableSorter);
}
+
+ free(pOurTcpTable);
}
}
break;