1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

Fix memory leak of crypt_ctx->h using openSSL 1.1+ (#177)

Need to use EVP_CIPHER_CTX_free instead of EVP_CIPHER_CTX_reset.
This commit is contained in:
Will Cosgrove
2017-05-12 16:34:26 -07:00
committed by GitHub
parent 323aa08f01
commit 97518ca8bd

View File

@@ -267,7 +267,7 @@ int _libssh2_md5_init(libssh2_md5_ctx *ctx);
#define _libssh2_cipher_3des EVP_des_ede3_cbc
#ifdef HAVE_OPAQUE_STRUCTS
#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_reset(*(ctx))
#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_free(*(ctx))
#else
#define _libssh2_cipher_dtor(ctx) EVP_CIPHER_CTX_cleanup(ctx)
#endif