[PATCH resend] adsldp: Fix memory leak on error path in search_ExecuteSearch (Coverity)
Alex Henrie
alexhenrie24 at gmail.com
Wed Feb 2 01:23:11 CST 2022
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
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 8039065eff3..f564bc6f6cc 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.35.1
More information about the wine-devel
mailing list