1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -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:
Miciah Dashiel Butler Masters 2006-01-17 03:15:56 +00:00 committed by Miciah Dashiel Butler Masters
parent dab904cff5
commit 836744ea84

View File

@ -294,7 +294,7 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
if (deo) {
deo->ses = ses;
deo->uri = get_uri_reference(uri);
deo->target = target;
deo->target = stracpy(target);
/* target will be freed in delayed_goto_uri_frame */
register_bottom_half(delayed_goto_uri_frame, deo);
goto end;