-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path222771.mypatch
31 lines (26 loc) · 931 Bytes
/
222771.mypatch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Alex Henrie <[email protected]>
Subject: [PATCH] adsldp: Fix memory leak in search_ExecuteSearch (Coverity)
Message-Id: <[email protected]>
Date: Wed, 29 Dec 2021 22:58:08 -0700
Signed-off-by: Alex Henrie <[email protected]>
---
dlls/adsldp/adsldp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index 3d5ea29882c..c8f63a25e0c 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -1302,7 +1302,11 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
props = NULL;
else
{
- if (count && !names) return E_ADS_BAD_PARAMETER;
+ if (count && !names)
+ {
+ heap_free(ldap_ctx);
+ return E_ADS_BAD_PARAMETER;
+ }
props = heap_alloc((count + 1) * sizeof(props[0]));
if (!props)
--
2.34.1