comparison 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
comparison
equal deleted inserted replaced
811:5de524aec047 812:c936abfa9935
381 if (host_arg == NULL) { 381 if (host_arg == NULL) {
382 printhelp(); 382 printhelp();
383 exit(EXIT_FAILURE); 383 exit(EXIT_FAILURE);
384 } 384 }
385 385
386 #ifdef ENABLE_CLI_PROXYCMD
387 if (cli_opts.proxycmd) {
388 /* To match the common path of m_freeing it */
389 cli_opts.proxycmd = m_strdup(cli_opts.proxycmd);
390 }
391 #endif
392
386 if (cli_opts.remoteport == NULL) { 393 if (cli_opts.remoteport == NULL) {
387 cli_opts.remoteport = "22"; 394 cli_opts.remoteport = "22";
388 } 395 }
389 396
390 /* If not explicitly specified with -t or -T, we don't want a pty if 397 /* If not explicitly specified with -t or -T, we don't want a pty if