1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-20 02:42:09 +03:00

Fix memory dealloc impedance mis-match #292 (#293)

When using ed25519 host keys and a custom memory allocator.
This commit is contained in:
Will Cosgrove
2019-02-20 12:00:44 -08:00
committed by GitHub
parent 5c805e23ea
commit 53aba03fef
3 changed files with 3 additions and 2 deletions

View File

@@ -325,6 +325,7 @@ typedef struct {
#define libssh2_ed25519_ctx libssh2_curve25519_keys
#define libssh2_x25519_ctx libssh2_curve25519_keys
#define _libssh2_ed25519_new_ctx() malloc(sizeof(libssh2_ed25519_ctx))
#define _libssh2_ed25519_free(ctx) do { \
if(ctx) { \
if(ctx->public_key) EVP_PKEY_free(ctx->public_key); \