Fix to resolve possible memory leak with DSA wc_DsaPublicKeyDecode in API unit test when used with HAVE_WOLF_BIGINT.

This commit is contained in:
David Garske
2021-12-28 16:34:54 -08:00
committed by kaleb-himes
parent f3038b7aa5
commit 8af742a93c

View File

@ -20621,6 +20621,7 @@ static int test_wc_DsaKeyToPublicDer(void)
}
if (ret == 0) {
word32 idx = 0;
wc_FreeDsaKey(&genKey);
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
}
/* Test without the SubjectPublicKeyInfo header */
@ -20635,6 +20636,7 @@ static int test_wc_DsaKeyToPublicDer(void)
}
if (ret == 0) {
word32 idx = 0;
wc_FreeDsaKey(&genKey);
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
}