[3/3] msi: Fix a memory leak in ITERATE_StartService.
Hans Leidekker
hans at codeweavers.com
Fri Feb 12 03:33:23 CST 2010
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)
--
1.6.3.3
More information about the wine-patches
mailing list