From f64832fe6a4bb330d42f44b51cd5addb1f521291 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 19 Dec 2019 14:07:57 +0100 Subject: [PATCH] rpcrt4: Support VT_BSTR in get_param_pointer_info. Fixes a leak in typelib marshaller. Based on patch by Kevin Puetz. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/rpcrt4/ndr_typelib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index cb5e4f17df6..7cb7da18adf 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -925,6 +925,12 @@ static HRESULT get_param_pointer_info(ITypeInfo *typeinfo, TYPEDESC *tdesc, int ITypeInfo_ReleaseTypeAttr(refinfo, attr); ITypeInfo_Release(refinfo); break; + case VT_BSTR: + *flags |= IsSimpleRef | MustFree; + *tfs_tdesc = tdesc; + if (!is_in && is_out) + *server_size = sizeof(void *); + break; default: *flags |= IsSimpleRef; *tfs_tdesc = tdesc;