oleaut32: ICreateTypeInfo2::AddVarDesc() should handle failure of allocation and initialization of a variant description.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
45955658e1
commit
d3d6f94ab1
|
@ -11019,6 +11019,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc(ICreateTypeInfo2 *iface,
|
|||
{
|
||||
ITypeInfoImpl *This = info_impl_from_ICreateTypeInfo2(iface);
|
||||
TLBVarDesc *var_desc;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p %u %p\n", This, index, varDesc);
|
||||
|
||||
|
@ -11044,7 +11045,9 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddVarDesc(ICreateTypeInfo2 *iface,
|
|||
var_desc = This->vardescs = heap_alloc_zero(sizeof(TLBVarDesc));
|
||||
|
||||
TLBVarDesc_Constructor(var_desc);
|
||||
TLB_AllocAndInitVarDesc(varDesc, &var_desc->vardesc_create);
|
||||
hr = TLB_AllocAndInitVarDesc(varDesc, &var_desc->vardesc_create);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
var_desc->vardesc = *var_desc->vardesc_create;
|
||||
|
||||
++This->typeattr.cVars;
|
||||
|
|
Loading…
Reference in New Issue