Skip to content

Commit acdf34e

Browse files
rousskovsquid-anubis
authored andcommitted
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 0477a07.
1 parent 51d1ddb commit acdf34e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/clients/FtpGateway.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ ftpReadCwd(Ftp::Gateway * ftpState)
14971497
ftpState->cwd_message.append('\n');
14981498
ftpState->cwd_message.append(w->key);
14991499
}
1500-
ftpState->ctrl.message = nullptr;
1500+
wordlistDestroy(&ftpState->ctrl.message);
15011501

15021502
/* Continue to traverse the path */
15031503
ftpTraverseDirectory(ftpState);

0 commit comments

Comments
 (0)