[NETSTAT] Fix coverity #1477187 "Double free" (#4069)

Within the current ShowTcpTable function logic, tcpTable would be freed twice.
The bug was introduced in b695971c.

Remove the second tcpTable free and fix coverity #1477187. CORE-17831
This commit is contained in:
Efe Itietie 2021-10-25 11:08:03 -07:00 committed by Stanislav Motylkov
parent f4ccc518e3
commit 0e75fc9240
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92

View file

@ -434,7 +434,6 @@ BOOL ShowTcpTable(VOID)
{
ConResPrintf(StdErr, IDS_ERROR_TCP_SNAPSHOT);
DoFormatMessage(error);
HeapFree(GetProcessHeap(), 0, tcpTable);
return FALSE;
}