From aeea70f95ffec80596e1349dcb58ac79bc2760a2 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Mon, 8 Jul 2013 22:42:32 +0800 Subject: [PATCH] =?UTF-8?q?strdup=20the=20proxycmd=20to=20avoid=20crash=20?= =?UTF-8?q?when=20freeing,=20from=20Llu=C3=ADs=20Batlle=20i=20Rossell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli-runopts.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli-runopts.c b/cli-runopts.c index 91a2f42..b8d304f 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -383,6 +383,13 @@ void cli_getopts(int argc, char ** argv) { exit(EXIT_FAILURE); } +#ifdef ENABLE_CLI_PROXYCMD + if (cli_opts.proxycmd) { + /* To match the common path of m_freeing it */ + cli_opts.proxycmd = m_strdup(cli_opts.proxycmd); + } +#endif + if (cli_opts.remoteport == NULL) { cli_opts.remoteport = "22"; }