mirror of
https://github.com/curl/curl.git
synced 2026-07-25 02:37:18 +03:00
tool_getparam: fix memory leak on error in parse_ech
- Free tmpcfg memory before returning an error code if aprintf failed. Closes https://github.com/curl/curl/pull/15753
This commit is contained in:
parent
6eb86e428d
commit
fc5c9ed253
1 changed files with 1 additions and 1 deletions
|
|
@ -1169,9 +1169,9 @@ static ParameterError parse_ech(struct GlobalConfig *global,
|
|||
if(err)
|
||||
return err;
|
||||
config->ech_config = aprintf("ecl:%s",tmpcfg);
|
||||
free(tmpcfg);
|
||||
if(!config->ech_config)
|
||||
return PARAM_NO_MEM;
|
||||
free(tmpcfg);
|
||||
} /* file done */
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue