From 012e0838cb9cb87dfc46a63dc1837bd548b63c14 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 3 Oct 2011 22:06:47 +0000 Subject: Set url pointers to NULL after unref. svn path=/trunk/netsurf/; revision=12942 --- render/box_construct.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'render') diff --git a/render/box_construct.c b/render/box_construct.c index e34e8d746..6101d8f1b 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -1587,8 +1587,10 @@ bool box_frameset(BOX_SPECIAL_PARAMS) */ static int box_frames_talloc_destructor(struct content_html_frames *f) { - if (f->url != NULL) + if (f->url != NULL) { nsurl_unref(f->url); + f->url = NULL; + } return 0; } @@ -1789,8 +1791,10 @@ bool box_create_frameset(struct content_html_frames *f, xmlNode *n, */ static int box_iframes_talloc_destructor(struct content_html_iframe *f) { - if (f->url != NULL) + if (f->url != NULL) { nsurl_unref(f->url); + f->url = NULL; + } return 0; } -- cgit v1.2.3