diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-09-07 00:53:24 +0200 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2019-09-09 14:43:57 +0200 |
commit | fa01370f7dc8f0a379483bbe74de11225857e5fe (patch) | |
tree | 4984d82d1ca2ba188e9d4b5a2ed380a14a5bda44 /crypto/dh | |
parent | feeb7ecd2f272e1c195e51cefc0d6b0199fef1d0 (diff) | |
download | openssl-fa01370f7dc8f0a379483bbe74de11225857e5fe.zip openssl-fa01370f7dc8f0a379483bbe74de11225857e5fe.tar.gz openssl-fa01370f7dc8f0a379483bbe74de11225857e5fe.tar.bz2 |
Use BN_clear_free in DH_set0_key
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9796)
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index df31662..0382e44 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -235,11 +235,11 @@ void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { if (pub_key != NULL) { - BN_free(dh->pub_key); + BN_clear_free(dh->pub_key); dh->pub_key = pub_key; } if (priv_key != NULL) { - BN_free(dh->priv_key); + BN_clear_free(dh->priv_key); dh->priv_key = priv_key; } |