From a8236c8c322101c273d14c62282f264555e147c4 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 15 Feb 1999 21:05:21 +0000 Subject: Fix various memory leaks in SSL, apps and DSA --- apps/s_client.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/s_client.c') diff --git a/apps/s_client.c b/apps/s_client.c index 2830785c95..a75e8ae311 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -743,9 +743,13 @@ int full; BIO_printf(bio,"%s, Cipher is %s\n", SSL_CIPHER_get_version(c), SSL_CIPHER_get_name(c)); - if (peer != NULL) + if (peer != NULL) { + EVP_PKEY *pktmp; + pktmp = X509_get_pubkey(peer); BIO_printf(bio,"Server public key is %d bit\n", - EVP_PKEY_bits(X509_get_pubkey(peer))); + EVP_PKEY_bits(pktmp)); + EVP_PKEY_free(pktmp); + } SSL_SESSION_print(bio,SSL_get_session(s)); BIO_printf(bio,"---\n"); if (peer != NULL) -- cgit v1.2.3