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

1
debian/changelog vendored
View File

@ -34,6 +34,7 @@ wine-staging (1.7.51) UNRELEASED; urgency=low
* Added patch to implement {Set,Get}ThreadGroupAffinity and related ntdll
functions.
* Added patch to properly render themed buttons when they are pressed.
* Added patch to fix possible memory leak in netprofm init_networks.
* Removed patch to fix bug in wineserver debug_children inheritance (accepted
upstream).
* Removed patch to use helper function for NtWaitForMultipleObjects and

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

View File

@ -173,6 +173,7 @@ patch_enable_all ()
enable_msvcrt_Math_Precision="$1"
enable_msvcrt_StdHandle_RefCount="$1"
enable_msvfw32_Image_Size="$1"
enable_netprofm_Coverity="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_APC_Start_Process="$1"
enable_ntdll_Activation_Context="$1"
@ -613,6 +614,9 @@ patch_enable ()
msvfw32-Image_Size)
enable_msvfw32_Image_Size="$2"
;;
netprofm-Coverity)
enable_netprofm_Coverity="$2"
;;
ntdll-APC_Performance)
enable_ntdll_APC_Performance="$2"
;;
@ -3743,6 +3747,18 @@ if test "$enable_msvfw32_Image_Size" -eq 1; then
) >> "$patchlist"
fi
# Patchset netprofm-Coverity
# |
# | Modified files:
# | * dlls/netprofm/list.c
# |
if test "$enable_netprofm_Coverity" -eq 1; then
patch_apply netprofm-Coverity/0001-netprofm-Fix-possible-memory-leak-in-init_networks-C.patch
(
echo '+ { "Sebastian Lackner", "netprofm: Fix possible memory leak in init_networks (Coverity).", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-APC_Performance
# |
# | Modified files: