Alexandre Julliard : iphlpapi: Fix some memory leaks.
Alexandre Julliard
julliard at winehq.org
Mon Aug 26 13:21:57 CDT 2013
Module: wine
Branch: master
Commit: fc36c5eb5d2795d8e4a8639896cce6aac18e0600
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc36c5eb5d2795d8e4a8639896cce6aac18e0600
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Aug 26 17:32:03 2013 +0200
iphlpapi: Fix some memory leaks.
---
dlls/iphlpapi/ipstats.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 962d421..809dbc6 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -2197,7 +2197,7 @@ DWORD build_tcp_table( TCP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
size_t Len = 0;
char *Buf = NULL;
struct xinpgen *pXIG, *pOrigXIG;
- struct pid_map *pMap;
+ struct pid_map *pMap = NULL;
unsigned NumEntries;
if (sysctlbyname ("net.inet.tcp.pcblist", NULL, &Len, NULL, 0) < 0)
@@ -2280,6 +2280,7 @@ DWORD build_tcp_table( TCP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
}
done:
+ HeapFree( GetProcessHeap(), 0, pMap );
HeapFree (GetProcessHeap (), 0, Buf);
}
#else
@@ -2471,7 +2472,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
size_t Len = 0;
char *Buf = NULL;
struct xinpgen *pXIG, *pOrigXIG;
- struct pid_map *pMap;
+ struct pid_map *pMap = NULL;
unsigned NumEntries;
if (sysctlbyname ("net.inet.udp.pcblist", NULL, &Len, NULL, 0) < 0)
@@ -2547,6 +2548,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
}
done:
+ HeapFree( GetProcessHeap(), 0, pMap );
HeapFree (GetProcessHeap (), 0, Buf);
}
#else
More information about the wine-cvs
mailing list