Commit c296a21c authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

advapi32: Fix memory leak in QueryServiceConfig2W (Coverity).

parent fa713c3d
...@@ -1663,6 +1663,7 @@ BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwLevel, LPBYTE buffe ...@@ -1663,6 +1663,7 @@ BOOL WINAPI QueryServiceConfig2W(SC_HANDLE hService, DWORD dwLevel, LPBYTE buffe
if (!needed) if (!needed)
{ {
if (dwLevel == SERVICE_CONFIG_DESCRIPTION) heap_free(bufptr);
SetLastError(ERROR_INVALID_ADDRESS); SetLastError(ERROR_INVALID_ADDRESS);
return FALSE; return FALSE;
} }
......
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