From: Remi Gacogne Date: Thu, 13 Jul 2017 14:22:30 +0000 (+0200) Subject: Don't leak when the loading a public ECDSA key fails X-Git-Tag: auth-4.1.0~7^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f5b0e176664d576603abc5cd6fd955c03d8dbdb;p=pdns Don't leak when the loading a public ECDSA key fails --- diff --git a/pdns/opensslsigners.cc b/pdns/opensslsigners.cc index 97bab5eb5..051734aba 100644 --- a/pdns/opensslsigners.cc +++ b/pdns/opensslsigners.cc @@ -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"); }