From 0244bca5cb6db0bd1343f9728056a134dfaaec2a Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 25 Nov 2024 19:45:24 +0000 Subject: [PATCH] Unix PuTTY/pterm: remove a premature cmdline_arg_list_free. If this occurs before cmdline_run_saved, then the latter will use its saved pointers to arguments in the freed CmdlineArgList. Affects uses of PuTTY without a saved session (like 'putty -ssh foohost'), and a very small number of pterm options, in particular -sessionlog. This is the simplest possible fix: just remove the free completely, so that the parsed command-line arguments leak. There's at most one instance of them per process, so it doesn't matter. --- unix/main-gtk-simple.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/unix/main-gtk-simple.c b/unix/main-gtk-simple.c index 9b3c225e..a9a897ca 100644 --- a/unix/main-gtk-simple.c +++ b/unix/main-gtk-simple.c @@ -551,8 +551,6 @@ bool do_cmdline(int argc, char **argv, bool do_everything, Conf *conf) } } - cmdline_arg_list_free(arglist); - return err; }