Commit 85bf1082 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

msi: Fix some leaks (coverity).

parent 82c97d95
......@@ -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] != ':')
......
......@@ -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;
......
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment