A bit more ownership cleanpups.
Some checks failed
CI / ubuntu-latest-html-tests (push) Has been cancelled
CI / ubuntu-latest-no-tls (push) Has been cancelled
CI / ubuntu-latest-mbedtls2 (push) Has been cancelled
CI / ubuntu-latest-openssl-3 (push) Has been cancelled
CI / ubuntu-latest-with-old-std (push) Has been cancelled
CI / ubuntu-20-04-openssl-1-1 (push) Has been cancelled
CI / alpine-mbedtls-3_6_0 (push) Has been cancelled
CI / macOS-13-openssl-1-1 (push) Has been cancelled
CI / macOS-13-openssl-3 (push) Has been cancelled
CI / freebsd-14-openssl-3 (push) Has been cancelled
CI / windows-mbedtls (push) Has been cancelled

This commit is contained in:
2025-08-01 02:39:13 -04:00
parent 1f4f31f409
commit bf2ea183b2
2 changed files with 5 additions and 7 deletions

View File

@ -1610,9 +1610,8 @@ char * CssParser::parseUrl()
}
if (urlStr) {
DilloUrl *dilloUrl = a_Url_new(urlStr->str, a_Url_str(this->baseUrl)).release();
char *url = dStrdup(a_Url_str(dilloUrl));
delete dilloUrl;
auto dilloUrl = a_Url_new(urlStr->str, a_Url_str(this->baseUrl));
char *url = dStrdup(a_Url_str(dilloUrl.get()));
dStr_free(urlStr, 1);
return url;
} else {

View File

@ -572,7 +572,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
*/
void Html_tag_open_isindex(DilloHtml *html, const char *tag, int tagsize)
{
DilloUrl *action;
std::unique_ptr< DilloUrl > action;
Embed *embed;
const char *attrbuf;
@ -582,9 +582,9 @@ void Html_tag_open_isindex(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).release();
action = a_Html_url_new(html, attrbuf, NULL, 0);
else
action = a_Url_dup(html->base_url).release();
action = a_Url_dup(html->base_url);
html->formNew(DILLO_HTML_METHOD_GET, action, DILLO_HTML_ENC_URLENCODED,
html->charset.has_value() ? html->charset.value().c_str() : nullptr);
@ -603,7 +603,6 @@ void Html_tag_open_isindex(DilloHtml *html, const char *tag, int tagsize)
HT2TB(html)->addWidget (embed, html->backgroundStyle ());
delete action;
html->InFlags &= ~IN_FORM;
}