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

mbedtls: Fix leak of 12 bytes by each key exchange. (#280)

Correctly free ducts by calling _libssh2_mbedtls_bignum_free() in dtor.
This commit is contained in:
Adrian Moran
2019-01-16 01:06:48 +01:00
committed by Will Cosgrove
parent 31aea1ec68
commit 77e0bc9796

View File

@@ -688,7 +688,7 @@ _libssh2_dh_secret(_libssh2_dh_ctx *dhctx, _libssh2_bn *secret,
void
_libssh2_dh_dtor(_libssh2_dh_ctx *dhctx)
{
mbedtls_mpi_free(*dhctx);
_libssh2_mbedtls_bignum_free(*dhctx);
*dhctx = NULL;
}