Commit 2afd65f6 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Handle NULL component correctly in MsiEnumComponentCostsW.

parent 3ef0a28f
...@@ -1844,13 +1844,12 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i ...@@ -1844,13 +1844,12 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i
{ {
HRESULT hr; HRESULT hr;
IWineMsiRemotePackage *remote_package; IWineMsiRemotePackage *remote_package;
BSTR bname; BSTR bname = NULL;
if (!(remote_package = (IWineMsiRemotePackage *)msi_get_remote( handle ))) if (!(remote_package = (IWineMsiRemotePackage *)msi_get_remote( handle )))
return ERROR_INVALID_HANDLE; return ERROR_INVALID_HANDLE;
bname = SysAllocString( component ); if (component && !(bname = SysAllocString( component )))
if (!bname)
{ {
IWineMsiRemotePackage_Release( remote_package ); IWineMsiRemotePackage_Release( remote_package );
return ERROR_OUTOFMEMORY; return ERROR_OUTOFMEMORY;
......
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