From acdf34ea285065565e91f2e2f0b5c09e86ae0446 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sat, 20 Jun 2026 16:15:17 +0000 Subject: [PATCH] Do not leak memory when reading FTP CWD responses (#2445) The bug affected a subset of HTTP transactions with `ftp://` URLs. It was introduced in 2009 commit 0477a072. --- src/clients/FtpGateway.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clients/FtpGateway.cc b/src/clients/FtpGateway.cc index e9031ce41a..664387e8f6 100644 --- a/src/clients/FtpGateway.cc +++ b/src/clients/FtpGateway.cc @@ -1497,7 +1497,7 @@ ftpReadCwd(Ftp::Gateway * ftpState) ftpState->cwd_message.append('\n'); ftpState->cwd_message.append(w->key); } - ftpState->ctrl.message = nullptr; + wordlistDestroy(&ftpState->ctrl.message); /* Continue to traverse the path */ ftpTraverseDirectory(ftpState); -- 2.47.3