1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-08 08:58:00 +00:00

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.
This commit is contained in:
Simon Tatham 2024-11-25 19:45:24 +00:00
parent 4dec8fda63
commit 0244bca5cb

View File

@ -551,8 +551,6 @@ bool do_cmdline(int argc, char **argv, bool do_everything, Conf *conf)
}
}
cmdline_arg_list_free(arglist);
return err;
}