From 07a43efb1f67eb0e7bac127d808d5836a9417ff9 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 20 Apr 2019 09:37:54 +0100 Subject: [PATCH] SSH-1: free mainchan_chan on destruction. We went through the tree234 of ordinary channels freeing the thing at the other end of each one, but of course in SSH-1 the main session channel is not stored in that tree due to its totally different shape in the protocol. So naturally I forgot to free _that_ one. --- ssh1connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ssh1connection.c b/ssh1connection.c index d9b98420..501ab2a3 100644 --- a/ssh1connection.c +++ b/ssh1connection.c @@ -197,6 +197,8 @@ static void ssh1_connection_free(PacketProtocolLayer *ppl) while ((c = delpos234(s->channels, 0)) != NULL) ssh1_channel_free(c); freetree234(s->channels); + if (s->mainchan_chan) + chan_free(s->mainchan_chan); if (s->x11disp) x11_free_display(s->x11disp);