sshnet: don't leak error string

This commit is contained in:
cinap_lenrek 2019-04-03 14:29:49 +02:00
parent 81f3b1a233
commit 7a3ceb58fc

View file

@ -1103,12 +1103,11 @@ handlemsg(Msg *m)
break;
}
c = getclient(chan);
if(c == nil || c->state != Dialing){
free(s);
break;
if(c != nil && c->state == Dialing){
c->state = Closed;
hangupclient(c, s);
}
c->state = Closed;
hangupclient(c, s);
free(s);
break;
}
free(m);