diff --git a/portfwd.c b/portfwd.c index 6fd3d406..49a8d50a 100644 --- a/portfwd.c +++ b/portfwd.c @@ -959,8 +959,10 @@ void portfwdmgr_config(PortFwdManager *mgr, Conf *conf) * rejected. */ ssh_rportfwd_remove(mgr->cl, pfr->remote); + pfr->remote = NULL; } else if (pfr->local) { pfl_terminate(pfr->local); + pfr->local = NULL; } delpos234(mgr->forwardings, i);