Mercurial > dropbear
diff cli-runopts.c @ 812:c936abfa9935
strdup the proxycmd to avoid crash when freeing, from LluĂs Batlle i Rossell
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 08 Jul 2013 22:42:32 +0800 |
parents | 0e5ea6812bb7 |
children | 7540c0822374 |
line wrap: on
line diff
--- a/cli-runopts.c Tue May 28 22:16:57 2013 +0800 +++ b/cli-runopts.c Mon Jul 08 22:42:32 2013 +0800 @@ -383,6 +383,13 @@ 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"; }