added missing delete in authssl.cc

This commit is contained in:
csoler 2020-12-23 20:47:28 +01:00
parent f2b1cccf42
commit d28665df18

View file

@ -1410,9 +1410,7 @@ int AuthSSLimpl::VerifyX509Callback(int /*preverify_ok*/, X509_STORE_CTX* ctx)
return verificationSuccess; return verificationSuccess;
} }
bool AuthSSLimpl::parseX509DetailsFromFile( bool AuthSSLimpl::parseX509DetailsFromFile( const std::string& certFilePath, RsPeerId& certId, RsPgpId& issuer, std::string& location )
const std::string& certFilePath, RsPeerId& certId,
RsPgpId& issuer, std::string& location )
{ {
FILE* tmpfp = RsDirUtil::rs_fopen(certFilePath.c_str(), "r"); FILE* tmpfp = RsDirUtil::rs_fopen(certFilePath.c_str(), "r");
if(!tmpfp) if(!tmpfp)
@ -1433,11 +1431,14 @@ bool AuthSSLimpl::parseX509DetailsFromFile(
} }
uint32_t diagnostic = 0; uint32_t diagnostic = 0;
if(!AuthX509WithGPG(x509,false, diagnostic)) if(!AuthX509WithGPG(x509,false, diagnostic))
{ {
RsErr() << __PRETTY_FUNCTION__ << " AuthX509WithGPG failed with " RsErr() << __PRETTY_FUNCTION__ << " AuthX509WithGPG failed with "
<< "diagnostic: " << diagnostic << std::endl; << "diagnostic: " << diagnostic << std::endl;
return false;
X509_free(x509);
return false;
} }
certId = RsX509Cert::getCertSslId(*x509); certId = RsX509Cert::getCertSslId(*x509);