Hans Leidekker : msi: Fix a memory leak in ITERATE_StartService.
Module: wine Branch: master Commit: f7879b43d50f71d073cc2b26792993044159e4d1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7879b43d50f71d073cc2b2679... Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Feb 12 10:33:23 2010 +0100 msi: Fix a memory leak in ITERATE_StartService. Found by Valgrind. --- dlls/msi/action.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 69e2b03..6ee3007 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -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)
participants (1)
-
Alexandre Julliard