=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.182 retrieving revision 1.183 diff -u -r1.182 -r1.183 --- src/usr.bin/ssh/clientloop.c 2007/09/04 03:21:03 1.182 +++ src/usr.bin/ssh/clientloop.c 2007/11/03 00:36:14 1.183 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.182 2007/09/04 03:21:03 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.183 2007/11/03 00:36:14 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -945,6 +945,9 @@ u_short cancel_port; Forward fwd; + bzero(&fwd, sizeof(fwd)); + fwd.listen_host = fwd.connect_host = NULL; + leave_raw_mode(); handler = signal(SIGINT, SIG_IGN); cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); @@ -1044,6 +1047,10 @@ enter_raw_mode(); if (cmd) xfree(cmd); + if (fwd.listen_host != NULL) + xfree(fwd.listen_host); + if (fwd.connect_host != NULL) + xfree(fwd.connect_host); } /* process the characters one by one */