diff --git a/src/cssparser.cc b/src/cssparser.cc index 5cc8e7d..2ccf5ba 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -1666,10 +1666,9 @@ void CssParser::parseImport(DilloHtml *html) if (urlStr) { if (importSyntaxIsOK && mediaIsSelected) { MSG("CssParser::parseImport(): @import %s\n", urlStr); - DilloUrl *url = a_Html_url_new (html, urlStr, a_Url_str(*this->baseUrl), + auto url = a_Html_url_new (html, urlStr, a_Url_str(*this->baseUrl), this->baseUrl ? 1 : 0); - a_Html_load_stylesheet(html, url); - delete url; + a_Html_load_stylesheet(html, url.get()); } dFree (urlStr); } diff --git a/src/form.cc b/src/form.cc index bc3cc2d..520045a 100644 --- a/src/form.cc +++ b/src/form.cc @@ -373,7 +373,7 @@ void Html_tag_open_form(DilloHtml *html, const char *tag, int tagsize) } } if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "action"))) - action = a_Html_url_new(html, attrbuf, NULL, 0); + action = a_Html_url_new(html, attrbuf, NULL, 0).release(); else { if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f) BUG_MSG("