mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:13:32 +03:00
tidy-up: replace Curl_safefree with free before re-assignment
Also drop `NULL` assignments after `Curl_safefree()`. Closes #16640
This commit is contained in:
parent
9b523773b8
commit
57218d5327
15 changed files with 45 additions and 49 deletions
|
|
@ -512,10 +512,10 @@ GetFileAndPassword(const char *nextarg, char **file, char **password)
|
|||
char *certname, *passphrase;
|
||||
if(nextarg) {
|
||||
parse_cert_parameter(nextarg, &certname, &passphrase);
|
||||
Curl_safefree(*file);
|
||||
free(*file);
|
||||
*file = certname;
|
||||
if(passphrase) {
|
||||
Curl_safefree(*password);
|
||||
free(*password);
|
||||
*password = passphrase;
|
||||
}
|
||||
}
|
||||
|
|
@ -1503,7 +1503,7 @@ static ParameterError parse_verbose(struct GlobalConfig *global,
|
|||
switch(global->verbosity) {
|
||||
case 0:
|
||||
global->verbosity = 1;
|
||||
Curl_safefree(global->trace_dump);
|
||||
free(global->trace_dump);
|
||||
global->trace_dump = strdup("%");
|
||||
if(!global->trace_dump)
|
||||
err = PARAM_NO_MEM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue