diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c index f68a03144f2..8bc4d1db22b 100644 --- a/dlls/jscript/dispex.c +++ b/dlls/jscript/dispex.c @@ -1413,7 +1413,9 @@ HRESULT disp_propget(script_ctx_t *ctx, IDispatch *disp, DISPID id, jsval_t *val if(FAILED(hres)) return hres; - return variant_to_jsval(&var, val); + hres = variant_to_jsval(&var, val); + VariantClear(&var); + return hres; } HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)