Commit 36af6828 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

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

parent 2b63fdd9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment