jscript: Fixed potential leak in RegExp lastIndex setter.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-07-28 18:45:05 +02:00 committed by Alexandre Julliard
parent b0dcbbdbee
commit 9fc2863ebd

View File

@ -335,6 +335,7 @@ static HRESULT RegExp_set_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t
TRACE("\n");
jsval_release(regexp->last_index_val);
hres = jsval_copy(value, &regexp->last_index_val);
if(FAILED(hres))
return hres;