msi: Fix some leaks (coverity).
This commit is contained in:
parent
82c97d954d
commit
85bf1082ce
@ -2215,7 +2215,10 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
|
|||||||
|
|
||||||
if (!(val = msi_alloc( sz ))) return ERROR_OUTOFMEMORY;
|
if (!(val = msi_alloc( sz ))) return ERROR_OUTOFMEMORY;
|
||||||
if ((r = msi_comp_find_prodcode(squished_pc, dwContext, szComponent, val, &sz)))
|
if ((r = msi_comp_find_prodcode(squished_pc, dwContext, szComponent, val, &sz)))
|
||||||
|
{
|
||||||
|
msi_free(val);
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
if (lstrlenW(val) > 2 &&
|
if (lstrlenW(val) > 2 &&
|
||||||
val[0] >= '0' && val[0] <= '9' && val[1] >= '0' && val[1] <= '9' && 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;
|
return;
|
||||||
|
|
||||||
size = GetFileVersionInfoSizeW(fusion, &handle);
|
size = GetFileVersionInfoSizeW(fusion, &handle);
|
||||||
if (!size) return;
|
if (!size)
|
||||||
|
goto done;
|
||||||
|
|
||||||
version = msi_alloc(size);
|
version = msi_alloc(size);
|
||||||
if (!version) return;
|
if (!version)
|
||||||
|
goto done;
|
||||||
|
|
||||||
if (!GetFileVersionInfoW(fusion, handle, size, version))
|
if (!GetFileVersionInfoW(fusion, handle, size, version))
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -763,7 +763,10 @@ UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
|
|||||||
|
|
||||||
r = OpenSourceKey(product, &source, MSICODE_PRODUCT, context, FALSE);
|
r = OpenSourceKey(product, &source, MSICODE_PRODUCT, context, FALSE);
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
msi_free(buffer);
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
sprintfW(buffer, format, typechar, index, value);
|
sprintfW(buffer, format, typechar, index, value);
|
||||||
|
|
||||||
|
@ -1253,6 +1253,8 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, LPWSTR tables,
|
|||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ERR("can't get table dimensions\n");
|
ERR("can't get table dimensions\n");
|
||||||
|
table->view->ops->delete(table->view);
|
||||||
|
msi_free(table);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user