Skip to content

Commit

Permalink
Don't leak when the loading a public ECDSA key fails
Browse files Browse the repository at this point in the history
(cherry picked from commit 5a23b49)
  • Loading branch information
rgacogne committed Nov 26, 2017
1 parent badf9e8 commit e87fe39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pdns/opensslsigners.cc
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ void OpenSSLECDSADNSCryptoKeyEngine::fromPublicKeyString(const std::string& inpu

int ret = EC_POINT_oct2point(d_ecgroup, pub_key, (unsigned char*) ecdsaPoint.c_str(), ecdsaPoint.length(), d_ctx);
if (ret != 1) {
EC_POINT_free(pub_key);
throw runtime_error(getName()+" reading ECP point from binary failed");
}

Expand Down

0 comments on commit e87fe39

Please sign in to comment.