diff --git a/src/common-session.c b/src/common-session.c index bea2d788..c9a76a0c 100644 --- a/src/common-session.c +++ b/src/common-session.c @@ -332,6 +332,12 @@ void session_cleanup() { } m_free(ses.keys->recv.zstream); } + if (ses.keys->trans.zstream != NULL) { + if (deflateEnd(ses.keys->trans.zstream) == Z_STREAM_ERROR) { + dropbear_exit("Crypto error"); + } + m_free(ses.keys->trans.zstream); + } #endif m_free(ses.remoteident);