From c4be7ce66992811c555375cb303f504153e1b33f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 17 May 2000 23:02:03 +1000 Subject: - RSAless operation patch from kevin_oconnor@standardandpoors.com --- sshd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index a13332cbd..256018f61 100644 --- a/sshd.c +++ b/sshd.c @@ -389,9 +389,12 @@ void destroy_sensitive_data(void) { /* Destroy the private and public keys. They will no longer be needed. */ - RSA_free(public_key); - RSA_free(sensitive_data.private_key); - RSA_free(sensitive_data.host_key); + if (public_key) + RSA_free(public_key); + if (sensitive_data.private_key) + RSA_free(sensitive_data.private_key); + if (sensitive_data.host_key) + RSA_free(sensitive_data.host_key); if (sensitive_data.dsa_host_key != NULL) key_free(sensitive_data.dsa_host_key); } -- cgit v1.2.3