From 12b290cbaf4fe984b9ed26a519d51358f28d98e7 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 17 Mar 2021 17:34:54 +0700 Subject: [PATCH] remove duplicate (deadcode) for clearing mp_int's --- wolfcrypt/src/dh.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/wolfcrypt/src/dh.c b/wolfcrypt/src/dh.c index c7803c33b..0ddd2603d 100644 --- a/wolfcrypt/src/dh.c +++ b/wolfcrypt/src/dh.c @@ -2177,11 +2177,6 @@ int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz, WOLFSSL_MSG("DH Public Key Set"); } } - /* Free Memory if error occurred */ - if (havePriv == 0 && keyPriv != NULL) - mp_clear(keyPriv); - if (havePub == 0 && keyPub != NULL) - mp_clear(keyPub); if (havePriv == 0 && havePub == 0) { return MEMORY_E;