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

@ -84,7 +84,7 @@ struct FILEPROTO {
static void file_cleanup(struct FILEPROTO *file)
{
Curl_safefree(file->freepath);
curlx_safefree(file->freepath);
file->path = NULL;
if(file->fd != -1) {
curlx_close(file->fd);
@ -193,7 +193,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
if(actual_path[i] == '/')
actual_path[i] = '\\';
else if(!actual_path[i]) { /* binary zero */
Curl_safefree(real_path);
curlx_safefree(real_path);
return CURLE_URL_MALFORMAT;
}
@ -202,7 +202,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
#else
if(memchr(real_path, 0, real_path_len)) {
/* binary zeroes indicate foul play */
Curl_safefree(real_path);
curlx_safefree(real_path);
return CURLE_URL_MALFORMAT;
}