Commit ee630a7a authored by Daniel Ruggeri's avatar Daniel Ruggeri
Browse files

Add cleanup for SSLProxyMachineCertificateChainFile during init

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242089 13f79535-47bb-0310-9956-ffa450edef68
parent 5e2e72e4
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1636,6 +1636,17 @@ static void ssl_init_ctx_cleanup_proxy(modssl_ctx_t *mctx)
    ssl_init_ctx_cleanup(mctx);

    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);
        mctx->pkp->certs = NULL;
    }