1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Add cleanup for SSLProxyMachineCertificateChainFile during init

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242089 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Ruggeri
2012-02-08 21:02:20 +00:00
parent cf0345a75f
commit 104e5a433c

View File

@@ -1636,6 +1636,17 @@ static void ssl_init_ctx_cleanup_proxy(modssl_ctx_t *mctx)
ssl_init_ctx_cleanup(mctx); ssl_init_ctx_cleanup(mctx);
if (mctx->pkp->certs) { if (mctx->pkp->certs) {
int i = 0;
int ncerts = sk_X509_INFO_num(mctx->pkp->certs);
if (mctx->pkp->ca_certs) {
for (i = 0; i < ncerts; i++) {
if (mctx->pkp->ca_certs[i] != NULL) {
sk_X509_pop_free(mctx->pkp->ca_certs[i], X509_free);
}
}
}
sk_X509_INFO_pop_free(mctx->pkp->certs, X509_INFO_free); sk_X509_INFO_pop_free(mctx->pkp->certs, X509_INFO_free);
mctx->pkp->certs = NULL; mctx->pkp->certs = NULL;
} }