CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2025/06/02 14:57:36
Modified files: usr.bin/ftp : fetch.c Log message: Fix a tiny memory leak (of username and pass) when the last auto_fetch() argument is an authenticated FTP URL of the form ftp://user:pass@host/dir/ with no file at the end, in which case auto_fetch() leaked these two strings and main() would then enter the interactive cmdscanner() loop, potentially becoming a long-running process. Also make it easier to see that the "url" pointer is neither leaked nor free(3)d uninitialized, by handling it at exactly the same places and in exactly the same way as username and pass, as requested by tb@. OK jsg@