Skip to content

Commit

Permalink
Fix missing cleanup of trans.zstream
Browse files Browse the repository at this point in the history
  • Loading branch information
mkj committed Dec 14, 2024
1 parent f576a54 commit 22a7c86
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 22a7c86

Please sign in to comment.