mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
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:
@ -20621,6 +20621,7 @@ static int test_wc_DsaKeyToPublicDer(void)
|
|||||||
}
|
}
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
word32 idx = 0;
|
word32 idx = 0;
|
||||||
|
wc_FreeDsaKey(&genKey);
|
||||||
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
|
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
|
||||||
}
|
}
|
||||||
/* Test without the SubjectPublicKeyInfo header */
|
/* Test without the SubjectPublicKeyInfo header */
|
||||||
@ -20635,6 +20636,7 @@ static int test_wc_DsaKeyToPublicDer(void)
|
|||||||
}
|
}
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
word32 idx = 0;
|
word32 idx = 0;
|
||||||
|
wc_FreeDsaKey(&genKey);
|
||||||
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
|
ret = wc_DsaPublicKeyDecode(der, &idx, &genKey, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user