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_cb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'apps/s_cb.c') diff --git a/apps/s_cb.c b/apps/s_cb.c index 1a7b06e1ee..ba0b548ea1 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -156,9 +156,13 @@ char *key_file; ssl=SSL_new(ctx); x509=SSL_get_certificate(ssl); - if (x509 != NULL) - EVP_PKEY_copy_parameters(X509_get_pubkey(x509), - SSL_get_privatekey(ssl)); + if (x509 != NULL) { + EVP_PKEY *pktmp; + pktmp = X509_get_pubkey(x509); + EVP_PKEY_copy_parameters(pktmp, + SSL_get_privatekey(ssl)); + EVP_PKEY_free(pktmp); + } SSL_free(ssl); */ -- cgit v1.2.3