mbedtls: Fix leak of 12 bytes by each key exchange.
Correctly free ducts by calling _libssh2_mbedtls_bignum_free() in dtor.
@@ -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;
}
