https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e75fc924045d4bcc8a2d859a905f251711cb1ce

commit 0e75fc924045d4bcc8a2d859a905f251711cb1ce
Author:     Efe Itietie <[email protected]>
AuthorDate: Mon Oct 25 11:08:03 2021 -0700
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Thu Oct 28 17:26:09 2021 +0300

    [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
---
 base/applications/network/netstat/netstat.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/base/applications/network/netstat/netstat.c 
b/base/applications/network/netstat/netstat.c
index bee7f834fd0..b1d177effec 100644
--- a/base/applications/network/netstat/netstat.c
+++ b/base/applications/network/netstat/netstat.c
@@ -434,7 +434,6 @@ BOOL ShowTcpTable(VOID)
     {
         ConResPrintf(StdErr, IDS_ERROR_TCP_SNAPSHOT);
         DoFormatMessage(error);
-        HeapFree(GetProcessHeap(), 0, tcpTable);
         return FALSE;
     }
 

Reply via email to