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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user