From 5bf9445315f0964a4848ef08ef0f2bf3ce4c3567 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 31 Oct 2025 03:41:53 +0100 Subject: [PATCH] ftp: fix leaking internal buffer `newhost` on error Pointed out by TIOBE scanner via Coverity 2025.3.0. Closes #19290 --- lib/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ftp.c b/lib/ftp.c index 3ac8db6813..4858ae230f 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -1925,7 +1925,7 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data, result = Curl_conn_get_ip_info(data, data->conn, FIRSTSOCKET, &is_ipv6, &ipquad); if(result) - return result; + goto error; (void)Curl_resolv_blocking(data, host_name, ipquad.remote_port, is_ipv6 ? CURL_IPRESOLVE_V6 : CURL_IPRESOLVE_V4, -- 2.47.3