Jacek Caban (@jacek) commented about dlls/vbscript/global.c:
case VT_DISPATCH: if (SUCCEEDED(IDispatch_GetTypeInfo(V_DISPATCH(arg), 0, GetUserDefaultLCID(), &typeinfo))) { - BSTR name = NULL; - hres = ITypeInfo_GetDocumentation(typeinfo, MEMBERID_NIL, &name, NULL, NULL, NULL); ITypeInfo_Release(typeinfo); + if (SUCCEEDED(hres) && name && *name) - { - hres = return_string(res, name); - SysFreeString(name); - return hres; - } - SysFreeString(name); + return_bstr(res, name);
If name is an empty string, it will be leaked. Also please squash those changes into a single commit. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1347#note_15675