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

kex: fix libgcrypt memory leaks of bignum

Fixes #168.
This commit is contained in:
Hannes Domani
2015-04-01 18:44:16 +02:00
committed by Alexander Lamaison
parent 5a88a86fef
commit 09c5e59933
4 changed files with 9 additions and 5 deletions

View File

@@ -175,6 +175,7 @@ void libssh2_md5(const unsigned char *message, unsigned long len, unsigned char
#define _libssh2_bn_ctx_new() BN_CTX_new()
#define _libssh2_bn_ctx_free(bnctx) BN_CTX_free(bnctx)
#define _libssh2_bn_init() BN_new()
#define _libssh2_bn_init_from_bin() _libssh2_bn_init()
#define _libssh2_bn_rand(bn, bits, top, bottom) BN_rand(bn, bits, top, bottom)
#define _libssh2_bn_mod_exp(r, a, p, m, ctx) BN_mod_exp(r, a, p, m, ctx)
#define _libssh2_bn_set_word(bn, val) BN_set_word(bn, val)