]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ftp: replace a `curlx_free()` with `curlx_dyn_free()`
authorViktor Szakats <commit@vsz.me>
Mon, 2 Feb 2026 01:24:05 +0000 (02:24 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 2 Feb 2026 11:28:13 +0000 (12:28 +0100)
On an error path.

Follow-up to f4beef524a53e1951c102fdb2ab96dd7a5e01077 #12638

Closes #20494

lib/ftp.c

index 1fda9c608dd0934469173c84a29e0db8d5c59384..767f2ae47dcbbd97bc8a39958eccf4ddcd11666d 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2981,7 +2981,7 @@ static CURLcode ftp_pwd_resp(struct Curl_easy *data,
       if(!ftpc->server_os && dir[0] != '/') {
         result = Curl_pp_sendf(data, &ftpc->pp, "%s", "SYST");
         if(result) {
-          curlx_free(dir);
+          curlx_dyn_free(&out);
           return result;
         }
       }