summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-17 23:02:03 +1000
committerDamien Miller <djm@mindrot.org>2000-05-17 23:02:03 +1000
commitc4be7ce66992811c555375cb303f504153e1b33f (patch)
tree429ab7e2c38e6042e377df9dc4031de433c06879 /sshd.c
parent615f939ebb48fdde404aae705057202512731331 (diff)
- RSAless operation patch from kevin_oconnor@standardandpoors.com
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index a13332cb..256018f6 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);
}