msi: Fix a memory leak in ITERATE_StartService.

Found by Valgrind.
This commit is contained in:
Hans Leidekker 2010-02-12 10:33:23 +01:00 committed by Alexandre Julliard
parent 82d50fa675
commit f7879b43d5
1 changed files with 5 additions and 2 deletions

View File

@ -4657,7 +4657,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
{
MSIPACKAGE *package = param;
MSICOMPONENT *comp;
SC_HANDLE scm, service = NULL;
SC_HANDLE scm = NULL, service = NULL;
LPCWSTR *vector = NULL;
LPWSTR name, args;
DWORD event, numargs;
@ -4672,7 +4672,10 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
event = MSI_RecordGetInteger(rec, 3);
if (!(event & msidbServiceControlEventStart))
return ERROR_SUCCESS;
{
r = ERROR_SUCCESS;
goto done;
}
scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT);
if (!scm)