diff options
author | Stefan Fritsch <sf@apache.org> | 2010-06-06 21:25:54 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2010-06-06 21:25:54 +0200 |
commit | 9c937ad76c37a85e2a4eb9bb1b55d476e7292d35 (patch) | |
tree | efb36bcc13893e183b6cec6abb5d16c771772a73 /support/ab.c | |
parent | Update transformations (diff) | |
download | apache2-9c937ad76c37a85e2a4eb9bb1b55d476e7292d35.tar.xz apache2-9c937ad76c37a85e2a4eb9bb1b55d476e7292d35.zip |
ab: Fix memory leak with -v2 and SSL.
PR: 49383
Submitted by: Pavel Kankovsky <peak argo troja mff cuni cz>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951932 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | support/ab.c | 5 |
1 files changed, 4 insertions, 1 deletions
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)); |