mirror of
https://github.com/curl/curl.git
synced 2026-07-27 06:27:23 +03:00
[tool_parsecfg]: free tparam if any curlx_dyn operation fails
This commit is contained in:
parent
4b423d8ef8
commit
83dc9487e2
1 changed files with 3 additions and 0 deletions
|
|
@ -214,15 +214,18 @@ int parseconfig(const char *filename)
|
|||
char *tparam = strdup(param + 1);
|
||||
if(!tparam) {
|
||||
rc = 1; /* out of memory */
|
||||
free(tparam);
|
||||
break;
|
||||
}
|
||||
curlx_dyn_reset(&pbuf);
|
||||
if(curlx_dyn_add(&pbuf, home)) {
|
||||
rc = 1; /* out of memory */
|
||||
free(tparam);
|
||||
break;
|
||||
}
|
||||
if(curlx_dyn_add(&pbuf, tparam)) {
|
||||
rc = 1; /* out of memory */
|
||||
free(tparam);
|
||||
break;
|
||||
}
|
||||
free(tparam);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue