mirror of
https://github.com/curl/curl.git
synced 2026-07-24 13:57:16 +03:00
curl_path: add curlx_dyn_free() on an error path
Follow-up to 976333dd40
Closes #19183
This commit is contained in:
parent
7295546447
commit
68e63a7997
1 changed files with 3 additions and 1 deletions
|
|
@ -167,8 +167,10 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, const char *homedir)
|
|||
/* Read to end of filename - either to whitespace or terminator */
|
||||
rc = curlx_str_word(&cp, &word, MAX_PATHLENGTH);
|
||||
if(rc) {
|
||||
if(rc == STRE_BIG)
|
||||
if(rc == STRE_BIG) {
|
||||
curlx_dyn_free(&out);
|
||||
return CURLE_TOO_LARGE;
|
||||
}
|
||||
else if(!content)
|
||||
/* no path, no word, this is incorrect */
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue