mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Avoid memleak
This commit is contained in:
parent
1cd1786f9c
commit
6e4c80a29e
@ -358,13 +358,19 @@ imported:
|
|||||||
}
|
}
|
||||||
if (!interpreter) return;
|
if (!interpreter) return;
|
||||||
|
|
||||||
if (!init_string(&code) || !init_string(&ret))
|
if (!init_string(&code)) return;
|
||||||
|
if (!init_string(&ret)) {
|
||||||
|
done_string(&code);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
add_bytes_to_string(&code, html, *end - html);
|
add_bytes_to_string(&code, html, *end - html);
|
||||||
|
|
||||||
ecmascript_eval(interpreter, &code, &ret);
|
ecmascript_eval(interpreter, &code, &ret);
|
||||||
done_string(&code);
|
done_string(&code);
|
||||||
if (!ret.length) return;
|
if (!ret.length) {
|
||||||
|
done_string(&ret);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: it doesn't work */
|
/* FIXME: it doesn't work */
|
||||||
html_top->invisible = 0;
|
html_top->invisible = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user