Module: wine Branch: master Commit: 73c7bcb6e53514ef2be9627324ef896a9319c0dc URL: http://source.winehq.org/git/wine.git/?a=commit;h=73c7bcb6e53514ef2be9627324...
Author: Mike McCormack mike@codeweavers.com Date: Tue Oct 10 15:20:39 2006 +0900
msi: Fix memory leaks and bad frees.
---
dlls/msi/appsearch.c | 4 ++-- dlls/msi/custom.c | 3 +++ dlls/msi/database.c | 1 + 3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index 622b97c..1d3559c 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -398,7 +398,7 @@ static UINT ACTION_AppSearchReg(MSIPACKA appValue); break; case msidbLocatorTypeFileName: - *appValue = (LPWSTR)value; + *appValue = strdupW((LPCWSTR)value); break; case msidbLocatorTypeRawValue: ACTION_ConvertRegValue(regType, value, sz, appValue); @@ -996,7 +996,7 @@ UINT ACTION_AppSearch(MSIPACKAGE *packag while (!rc) { MSISIGNATURE sig; - LPWSTR value; + LPWSTR value = NULL;
rc = MSI_ViewFetch(view,&row); if (rc != ERROR_SUCCESS) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index dfebfce..5220a57 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -167,7 +167,10 @@ UINT ACTION_CustomAction(MSIPACKAGE *pac
row = MSI_QueryGetRecord( package->db, ExecSeqQuery, action ); if (!row) + { + msi_free(action_copy); return ERROR_CALL_NOT_IMPLEMENTED; + }
type = MSI_RecordGetInteger(row,2);
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index a0d1867..266b467 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -668,6 +668,7 @@ done: msi_free(data); msi_free(columns); msi_free(types); + msi_free(labels);
for (i = 0; i < num_records; i++) msi_free(records[i]);