1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

adsldp: Fix memory leak on error path in search_ExecuteSearch (Coverity).

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 36af682895)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Alex Henrie 2022-02-02 00:23:11 -07:00 committed by Alexandre Julliard
parent e74125c4ba
commit 0344482cf4

View file

@ -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)