Commit f7879b43 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Fix a memory leak in ITERATE_StartService.

Found by Valgrind.
parent 82d50fa6
...@@ -4657,7 +4657,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) ...@@ -4657,7 +4657,7 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
{ {
MSIPACKAGE *package = param; MSIPACKAGE *package = param;
MSICOMPONENT *comp; MSICOMPONENT *comp;
SC_HANDLE scm, service = NULL; SC_HANDLE scm = NULL, service = NULL;
LPCWSTR *vector = NULL; LPCWSTR *vector = NULL;
LPWSTR name, args; LPWSTR name, args;
DWORD event, numargs; DWORD event, numargs;
...@@ -4672,7 +4672,10 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param) ...@@ -4672,7 +4672,10 @@ static UINT ITERATE_StartService(MSIRECORD *rec, LPVOID param)
event = MSI_RecordGetInteger(rec, 3); event = MSI_RecordGetInteger(rec, 3);
if (!(event & msidbServiceControlEventStart)) if (!(event & msidbServiceControlEventStart))
return ERROR_SUCCESS; {
r = ERROR_SUCCESS;
goto done;
}
scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT); scm = OpenSCManagerW(NULL, NULL, SC_MANAGER_CONNECT);
if (!scm) if (!scm)
......
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