Fix use after unref.

This commit is contained in:
Michael Drake 2013-09-08 19:28:57 +01:00
parent f13a11e31f
commit 7f31b2c776

View File

@ -542,7 +542,6 @@ static nserror hotlist_load_entry(dom_node *li, hotlist_load_ctx *ctx)
if (title1 != NULL) {
title = dom_string_data(title1);
dom_string_unref(title1);
} else {
title = "<No title>";
}
@ -556,6 +555,9 @@ static nserror hotlist_load_entry(dom_node *li, hotlist_load_ctx *ctx)
warn_user(messages_get_errorcode(err), NULL);
if (title1 != NULL)
dom_string_unref(title1);
return err;
}
@ -563,6 +565,8 @@ static nserror hotlist_load_entry(dom_node *li, hotlist_load_ctx *ctx)
err = hotlist_add_entry_internal(url, title, NULL, ctx->rel,
ctx->relshp, &ctx->rel);
nsurl_unref(url);
if (title1 != NULL)
dom_string_unref(title1);
ctx->relshp = TREE_REL_NEXT_SIBLING;
if (err != NSERROR_OK) {