tidy-up: rename Curl_safefree()/tool_safefree() to curlx_safefree()

To sync names for the same macro logic between lib and src, and to move
it to the curlx namespace, to match `curlx_free()` that it's calling.

Closes #21151
This commit is contained in:
Viktor Szakats 2026-03-30 01:54:10 +02:00
parent 2b3dfb4ad4
commit 0df6c01db3
No known key found for this signature in database
72 changed files with 494 additions and 500 deletions

View file

@ -705,8 +705,8 @@ static CURLcode multi_done(struct Curl_easy *data,
Curl_resolv_shutdown_all(data);
/* Cleanup possible redirect junk */
Curl_safefree(data->req.newurl);
Curl_safefree(data->req.location);
curlx_safefree(data->req.newurl);
curlx_safefree(data->req.location);
switch(status) {
case CURLE_ABORTED_BY_CALLBACK:
@ -4013,13 +4013,13 @@ void Curl_multi_xfer_sockbuf_release(struct Curl_easy *data, char *buf)
static void multi_xfer_bufs_free(struct Curl_multi *multi)
{
DEBUGASSERT(multi);
Curl_safefree(multi->xfer_buf);
curlx_safefree(multi->xfer_buf);
multi->xfer_buf_len = 0;
multi->xfer_buf_borrowed = FALSE;
Curl_safefree(multi->xfer_ulbuf);
curlx_safefree(multi->xfer_ulbuf);
multi->xfer_ulbuf_len = 0;
multi->xfer_ulbuf_borrowed = FALSE;
Curl_safefree(multi->xfer_sockbuf);
curlx_safefree(multi->xfer_sockbuf);
multi->xfer_sockbuf_len = 0;
multi->xfer_sockbuf_borrowed = FALSE;
}