comparison cli-runopts.c @ 412:47bcc3536bd5

merge of '691c56da3db2685f58ea53540a73c1b79e7df9cd' and 'e0efd546c3cdb2828971e41af2afe43e850c641d'
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Feb 2007 10:44:12 +0000
parents b895f91c2ee6 253958302381
children ab57ba0cb667
comparison
equal deleted inserted replaced
410:b895f91c2ee6 412:47bcc3536bd5
361 struct TCPFwdList* newfwd = NULL; 361 struct TCPFwdList* newfwd = NULL;
362 char * str = NULL; 362 char * str = NULL;
363 363
364 TRACE(("enter addforward")) 364 TRACE(("enter addforward"))
365 365
366 /* We probably don't want to be editing argvs */ 366 /* We need to split the original argument up. This var
367 is never free()d. */
367 str = m_strdup(origstr); 368 str = m_strdup(origstr);
368 369
369 listenport = str; 370 listenport = str;
370 371
371 connectaddr = strchr(str, ':'); 372 connectaddr = strchr(str, ':');
413 } 414 }
414 415
415 newfwd->next = *fwdlist; 416 newfwd->next = *fwdlist;
416 *fwdlist = newfwd; 417 *fwdlist = newfwd;
417 418
418 m_free(str);
419
420 TRACE(("leave addforward: done")) 419 TRACE(("leave addforward: done"))
421 return; 420 return;
422 421
423 fail: 422 fail:
424 dropbear_exit("Bad TCP forward '%s'", origstr); 423 dropbear_exit("Bad TCP forward '%s'", origstr);