[PATCH 1/8] adsldp: Fix memory leak.

Dmitry Timoshkov dmitry at baikal.ru
Thu Mar 26 02:08:54 CDT 2020


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/adsldp/adsldp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c
index 4957828391..76a3f285c4 100644
--- a/dlls/adsldp/adsldp.c
+++ b/dlls/adsldp/adsldp.c
@@ -1169,7 +1169,10 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
 
         props = heap_alloc((count + 1) * sizeof(props[0]));
         if (!props)
+        {
+            heap_free(ldap_ctx);
             return E_OUTOFMEMORY;
+        }
 
         for (i = 0; i < count; i++)
             props[i] = names[i];
-- 
2.25.1




More information about the wine-devel mailing list