diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 4bcb5c58cf4..92ef52cbc15 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -2215,7 +2215,10 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode, if (!(val = msi_alloc( sz ))) return ERROR_OUTOFMEMORY; if ((r = msi_comp_find_prodcode(squished_pc, dwContext, szComponent, val, &sz))) + { + msi_free(val); return r; + } if (lstrlenW(val) > 2 && val[0] >= '0' && val[0] <= '9' && val[1] >= '0' && val[1] <= '9' && val[2] != ':') diff --git a/dlls/msi/package.c b/dlls/msi/package.c index f398c10fc42..015af007fb5 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -638,10 +638,12 @@ static void set_msi_assembly_prop(MSIPACKAGE *package) return; size = GetFileVersionInfoSizeW(fusion, &handle); - if (!size) return; + if (!size) + goto done; version = msi_alloc(size); - if (!version) return; + if (!version) + goto done; if (!GetFileVersionInfoW(fusion, handle, size, version)) goto done; diff --git a/dlls/msi/source.c b/dlls/msi/source.c index 881f3d26bf2..ab8541c170c 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -763,7 +763,10 @@ UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid, r = OpenSourceKey(product, &source, MSICODE_PRODUCT, context, FALSE); if (r != ERROR_SUCCESS) + { + msi_free(buffer); return r; + } sprintfW(buffer, format, typechar, index, value); diff --git a/dlls/msi/where.c b/dlls/msi/where.c index 45fda442bc8..1bf77889580 100644 --- a/dlls/msi/where.c +++ b/dlls/msi/where.c @@ -1253,6 +1253,8 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR tables, if (r != ERROR_SUCCESS) { ERR("can't get table dimensions\n"); + table->view->ops->delete(table->view); + msi_free(table); goto end; }