tidy-up: use curlx_safefree()

Closes #21700
This commit is contained in:
Viktor Szakats 2026-05-20 20:43:59 +02:00
parent d3b04e5600
commit bcd0497c81
No known key found for this signature in database
19 changed files with 41 additions and 80 deletions

View file

@ -1976,10 +1976,8 @@ static CURLcode http_useragent(struct Curl_easy *data)
it might have been used in the proxy connect, but if we have got a header
with the user-agent string specified, we erase the previously made string
here. */
if(Curl_checkheaders(data, STRCONST("User-Agent"))) {
curlx_free(data->state.aptr.uagent);
data->state.aptr.uagent = NULL;
}
if(Curl_checkheaders(data, STRCONST("User-Agent")))
curlx_safefree(data->state.aptr.uagent);
return CURLE_OK;
}