advapi32: Fix memory leak in QueryServiceConfig2W (Coverity).

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2018-11-04 14:15:24 -07:00 committed by Alexandre Julliard
parent fa713c3d23
commit c296a21cdb
1 changed files with 1 additions and 0 deletions

View File

@ -1663,6 +1663,7 @@ BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwLevel, LPBYTE buffe
if (!needed)
{
if (dwLevel == SERVICE_CONFIG_DESCRIPTION) heap_free(bufptr);
SetLastError(ERROR_INVALID_ADDRESS);
return FALSE;
}