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>
This commit is contained in:
parent
2b63fdd9a5
commit
36af682895
|
@ -1302,7 +1302,11 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
|
||||||
props = NULL;
|
props = NULL;
|
||||||
else
|
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]));
|
props = heap_alloc((count + 1) * sizeof(props[0]));
|
||||||
if (!props)
|
if (!props)
|
||||||
|
|
Loading…
Reference in New Issue