Added patch to fix possible memory leak in netprofm init_networks.

This commit is contained in:
Sebastian Lackner
2015-09-06 12:54:22 +02:00
parent 9af3e03c5b
commit 031935bc29
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
From f92787d0eccc628d95a99f0e0db958f9af563c23 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 6 Sep 2015 12:53:26 +0200
Subject: netprofm: Fix possible memory leak in init_networks (Coverity).
---
dlls/netprofm/list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c
index 197ef68..c30522d 100644
--- a/dlls/netprofm/list.c
+++ b/dlls/netprofm/list.c
@@ -1681,7 +1681,7 @@ static void init_networks( struct list_manager *mgr )
if (ret != ERROR_BUFFER_OVERFLOW) return;
if (!(buf = heap_alloc( size ))) return;
- if (GetAdaptersAddresses( WS_AF_UNSPEC, flags, NULL, buf, &size )) return;
+ if (GetAdaptersAddresses( WS_AF_UNSPEC, flags, NULL, buf, &size )) goto done;
memset( &id, 0, sizeof(id) );
for (aa = buf; aa; aa = aa->Next)
--
2.5.1