Commit b9aaaacc authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

jscript: Fix memory leak on error path in regexp_string_match (scan-build).

parent 35dc94bc
......@@ -766,8 +766,10 @@ HRESULT regexp_string_match(script_ctx_t *ctx, jsdisp_t *re, jsstr_t *jsstr, jsv
}
hres = create_array(ctx, match_cnt, &array);
if(FAILED(hres))
if(FAILED(hres)) {
free(match_result);
return hres;
}
for(i=0; i < match_cnt; i++) {
jsstr_t *tmp_str;
......
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