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:
committed by
Will Cosgrove
parent
31aea1ec68
commit
77e0bc9796
@@ -688,7 +688,7 @@ _libssh2_dh_secret(_libssh2_dh_ctx *dhctx, _libssh2_bn *secret,
|
|||||||
void
|
void
|
||||||
_libssh2_dh_dtor(_libssh2_dh_ctx *dhctx)
|
_libssh2_dh_dtor(_libssh2_dh_ctx *dhctx)
|
||||||
{
|
{
|
||||||
mbedtls_mpi_free(*dhctx);
|
_libssh2_mbedtls_bignum_free(*dhctx);
|
||||||
*dhctx = NULL;
|
*dhctx = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user