← Commit list

68e63a7997

x2018
x2018
2025-10-22
SUCCESS Duration: 149s

Subject

curl_path: add curlx_dyn_free() on an error path

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vssh/curl_path.c+3 -1
@@ -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;