Fix valgrind errors

This commit is contained in:
Carie Pointer
2020-01-10 10:08:39 -07:00
parent de3536a067
commit ef99086aee
2 changed files with 3 additions and 1 deletions

View File

@@ -19730,6 +19730,8 @@ WOLFSSL_EC_KEY *wolfSSL_EC_KEY_dup(const WOLFSSL_EC_KEY *src)
return NULL;
}
/* Free priv_key before call to dup function */
wolfSSL_BN_free(dup->priv_key);
dup->priv_key = wolfSSL_BN_dup(src->priv_key);
if (dup->priv_key == NULL) {
WOLFSSL_MSG("BN_dup error");

View File

@@ -375,7 +375,7 @@ int wc_CryptKey(const char* password, int passwordSz, byte* salt,
int length, int version, byte* cbcIv, int enc, int shaOid)
{
int typeH;
int derivedLen;
int derivedLen = 0;
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
byte* key;