Skip to content

Commit 62b13cb

Browse files
committed
Fix more leaks in OSSLECDSA
1 parent e450222 commit 62b13cb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/lib/crypto/OSSLECDSA.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ bool OSSLECDSA::verify(PublicKey* publicKey, const ByteString& originalData,
429429
!ECDSA_SIG_set0(sig, bn_r, bn_s))
430430
{
431431
ERROR_MSG("Could not add data to the ECDSA_SIG object");
432+
BN_free(bn_r);
433+
BN_free(bn_s);
432434
ECDSA_SIG_free(sig);
433435
return false;
434436
}
@@ -445,6 +447,7 @@ bool OSSLECDSA::verify(PublicKey* publicKey, const ByteString& originalData,
445447
|| !digest->hashFinal(prepDataToSign))
446448
{
447449
delete digest;
450+
ECDSA_SIG_free(sig);
448451
return false;
449452
}
450453
delete digest;

0 commit comments

Comments
 (0)