summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
index f2f0b6ad..bcd941b3 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -170,10 +170,13 @@ void crypto_free(struct ssh_crypto_struct *crypto){
(deflateEnd(crypto->compress_out_ctx) != 0)) {
inflateEnd(crypto->compress_out_ctx);
}
+ SAFE_FREE(crypto->compress_out_ctx);
+
if (crypto->compress_in_ctx &&
(deflateEnd(crypto->compress_in_ctx) != 0)) {
inflateEnd(crypto->compress_in_ctx);
}
+ SAFE_FREE(crypto->compress_in_ctx);
#endif /* WITH_ZLIB */
if(crypto->encryptIV)
SAFE_FREE(crypto->encryptIV);