1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Avoid memleak

This commit is contained in:
2006-01-28 08:37:58 +01:00
parent 1cd1786f9c
commit 6e4c80a29e

View File

@ -358,13 +358,19 @@ imported:
}
if (!interpreter) return;
if (!init_string(&code) || !init_string(&ret))
if (!init_string(&code)) return;
if (!init_string(&ret)) {
done_string(&code);
return;
}
add_bytes_to_string(&code, html, *end - html);
ecmascript_eval(interpreter, &code, &ret);
done_string(&code);
if (!ret.length) return;
if (!ret.length) {
done_string(&ret);
return;
}
/* FIXME: it doesn't work */
html_top->invisible = 0;