mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
js_window_open: Fix extra free that I just introduced
Assign deo->target a copy of target instead of target itself because delayed_goto_uri_frame frees deo->target and SpiderMonkey owns target. Reported by Jonas.
This commit is contained in:
parent
dab904cff5
commit
836744ea84
@ -294,7 +294,7 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
if (deo) {
|
if (deo) {
|
||||||
deo->ses = ses;
|
deo->ses = ses;
|
||||||
deo->uri = get_uri_reference(uri);
|
deo->uri = get_uri_reference(uri);
|
||||||
deo->target = target;
|
deo->target = stracpy(target);
|
||||||
/* target will be freed in delayed_goto_uri_frame */
|
/* target will be freed in delayed_goto_uri_frame */
|
||||||
register_bottom_half(delayed_goto_uri_frame, deo);
|
register_bottom_half(delayed_goto_uri_frame, deo);
|
||||||
goto end;
|
goto end;
|
||||||
|
Loading…
Reference in New Issue
Block a user