Commit 3abd27c6 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

oleaut32: Fix VARIANT_UserFree.

parent 2898b5d9
...@@ -646,23 +646,26 @@ void WINAPI VARIANT_UserFree(unsigned long *pFlags, VARIANT *pvar) ...@@ -646,23 +646,26 @@ void WINAPI VARIANT_UserFree(unsigned long *pFlags, VARIANT *pvar)
VariantClear(pvar); VariantClear(pvar);
if (!ref) return; if (!ref) return;
switch (vt) { if(vt & VT_ARRAY)
case VT_BSTR | VT_BYREF: LPSAFEARRAY_UserFree(pFlags, V_ARRAYREF(pvar));
BSTR_UserFree(pFlags, ref); else
break; {
case VT_VARIANT | VT_BYREF: switch (vt)
VARIANT_UserFree(pFlags, ref); {
break; case VT_BSTR | VT_BYREF:
case VT_RECORD | VT_BYREF: BSTR_UserFree(pFlags, V_BSTRREF(pvar));
FIXME("handle BRECORD by ref\n"); break;
break; case VT_VARIANT | VT_BYREF:
case VT_UNKNOWN: VARIANT_UserFree(pFlags, V_VARIANTREF(pvar));
case VT_DISPATCH: break;
IUnknown_Release(V_UNKNOWN(pvar)); case VT_RECORD | VT_BYREF:
break; FIXME("handle BRECORD by ref\n");
default: break;
FIXME("handle unknown complex type\n"); case VT_UNKNOWN | VT_BYREF:
break; case VT_DISPATCH | VT_BYREF:
IUnknown_Release(*V_UNKNOWNREF(pvar));
break;
}
} }
CoTaskMemFree(ref); CoTaskMemFree(ref);
......
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