From: Stefan Fritsch Date: Sun, 6 Jun 2010 19:25:54 +0000 (+0000) Subject: ab: Fix memory leak with -v2 and SSL. X-Git-Tag: 2.3.6~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c937ad76c37a85e2a4eb9bb1b55d476e7292d35;p=apache ab: Fix memory leak with -v2 and SSL. PR: 49383 Submitted by: Pavel Kankovsky git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951932 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7e698c3f13..6ad377c20f 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,9 @@ Changes with Apache 2.3.6 processing is completed, avoiding orphaned callback pointers. [Brett Gervasoni , Jeff Trawick] + *) ab: Fix memory leak with -v2 and SSL. PR 49383. + [Pavel Kankovsky ] + *) core: Add per-module and per-directory loglevel configuration. Add some more trace logging. mod_rewrite: Replace RewriteLog/RewriteLogLevel with trace log levels. diff --git a/support/ab.c b/support/ab.c index e4e76705da..be9d9fc07f 100644 --- a/support/ab.c +++ b/support/ab.c @@ -557,6 +557,7 @@ static int ssl_print_connection_info(BIO *bio, SSL *ssl) static void ssl_print_cert_info(BIO *bio, X509 *cert) { X509_NAME *dn; + EVP_PKEY *pk; char buf[1024]; BIO_printf(bio, "Certificate version: %ld\n", X509_get_version(cert)+1); @@ -568,8 +569,10 @@ static void ssl_print_cert_info(BIO *bio, X509 *cert) ASN1_UTCTIME_print(bio, X509_get_notAfter(cert)); BIO_printf(bio,"\n"); + pk = X509_get_pubkey(cert); BIO_printf(bio,"Public key is %d bits\n", - EVP_PKEY_bits(X509_get_pubkey(cert))); + EVP_PKEY_bits(pk)); + EVP_PKEY_free(pk); dn = X509_get_issuer_name(cert); X509_NAME_oneline(dn, buf, sizeof(buf));