msi: Fix a memory leak in ITERATE_StartService.
Found by Valgrind.
This commit is contained in:
parent
82d50fa675
commit
f7879b43d5
|
@ -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)
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue