rpcrt4: Use MustFree for all non-base types in get_param_pointer_info.
Fixes a leak for VT_VARIANT. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d26998d6e5
commit
1980fcafe1
|
@ -925,12 +925,6 @@ static HRESULT get_param_pointer_info(ITypeInfo *typeinfo, TYPEDESC *tdesc, int
|
||||||
ITypeInfo_ReleaseTypeAttr(refinfo, attr);
|
ITypeInfo_ReleaseTypeAttr(refinfo, attr);
|
||||||
ITypeInfo_Release(refinfo);
|
ITypeInfo_Release(refinfo);
|
||||||
break;
|
break;
|
||||||
case VT_BSTR:
|
|
||||||
*flags |= IsSimpleRef | MustFree;
|
|
||||||
*tfs_tdesc = tdesc;
|
|
||||||
if (!is_in && is_out)
|
|
||||||
*server_size = sizeof(void *);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
*flags |= IsSimpleRef;
|
*flags |= IsSimpleRef;
|
||||||
*tfs_tdesc = tdesc;
|
*tfs_tdesc = tdesc;
|
||||||
|
@ -938,6 +932,8 @@ static HRESULT get_param_pointer_info(ITypeInfo *typeinfo, TYPEDESC *tdesc, int
|
||||||
*server_size = type_memsize(typeinfo, tdesc);
|
*server_size = type_memsize(typeinfo, tdesc);
|
||||||
if ((*basetype = get_basetype(typeinfo, tdesc)))
|
if ((*basetype = get_basetype(typeinfo, tdesc)))
|
||||||
*flags |= IsBasetype;
|
*flags |= IsBasetype;
|
||||||
|
else
|
||||||
|
*flags |= MustFree;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue