mirror of
https://github.com/curl/curl.git
synced 2026-05-16 06:26:20 +03:00
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:
parent
2b3dfb4ad4
commit
0df6c01db3
72 changed files with 494 additions and 500 deletions
|
|
@ -160,7 +160,7 @@ static struct tool_mime *tool_mime_new_filedata(struct tool_mime *parent,
|
|||
}
|
||||
m = tool_mime_new(parent, TOOLMIME_STDIN);
|
||||
if(!m)
|
||||
tool_safefree(data);
|
||||
curlx_safefree(data);
|
||||
else {
|
||||
m->data = data;
|
||||
m->origin = origin;
|
||||
|
|
@ -181,11 +181,11 @@ void tool_mime_free(struct tool_mime *mime)
|
|||
tool_mime_free(mime->subparts);
|
||||
if(mime->prev)
|
||||
tool_mime_free(mime->prev);
|
||||
tool_safefree(mime->name);
|
||||
tool_safefree(mime->filename);
|
||||
tool_safefree(mime->type);
|
||||
tool_safefree(mime->encoder);
|
||||
tool_safefree(mime->data);
|
||||
curlx_safefree(mime->name);
|
||||
curlx_safefree(mime->filename);
|
||||
curlx_safefree(mime->type);
|
||||
curlx_safefree(mime->encoder);
|
||||
curlx_safefree(mime->data);
|
||||
curl_slist_free_all(mime->headers);
|
||||
curlx_free(mime);
|
||||
}
|
||||
|
|
@ -817,7 +817,7 @@ int formparse(const char *input,
|
|||
warnf("error while reading standard input");
|
||||
goto fail;
|
||||
}
|
||||
tool_safefree(part->data);
|
||||
curlx_safefree(part->data);
|
||||
part->size = -1;
|
||||
result = CURLE_OK;
|
||||
}
|
||||
|
|
@ -850,7 +850,7 @@ int formparse(const char *input,
|
|||
warnf("error while reading standard input");
|
||||
goto fail;
|
||||
}
|
||||
tool_safefree(part->data);
|
||||
curlx_safefree(part->data);
|
||||
part->size = -1;
|
||||
result = CURLE_OK;
|
||||
}
|
||||
|
|
@ -891,7 +891,7 @@ int formparse(const char *input,
|
|||
}
|
||||
err = 0;
|
||||
fail:
|
||||
tool_safefree(contents);
|
||||
curlx_safefree(contents);
|
||||
curl_slist_free_all(headers);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue