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:
parent
e74125c4ba
commit
0344482cf4
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue