summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 14:02:16 +1100
committerDamien Miller <djm@mindrot.org>2006-03-26 14:02:16 +1100
commit429fcc23db22469ca48d18ad4a2940a265965caf (patch)
treebfeb3aae0ac79c168f0470e5ad1aadfd1720dcab /key.c
parent96937bd9144f582330478ed5c5b76dd3286c46e4 (diff)
- djm@cvs.openbsd.org 2006/03/20 11:38:46
[key.c] (really) last of the Coverity diffs: avoid possible NULL deref in key_free. via elad AT netbsd.org; markus@ ok
Diffstat (limited to 'key.c')
-rw-r--r--key.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/key.c b/key.c
index 5cb54c13b..283aea99e 100644
--- a/key.c
+++ b/key.c
@@ -122,6 +122,8 @@ key_new_private(int type)
122void 122void
123key_free(Key *k) 123key_free(Key *k)
124{ 124{
125 if (k == NULL)
126 fatal("key_free: key is NULL);
125 switch (k->type) { 127 switch (k->type) {
126 case KEY_RSA1: 128 case KEY_RSA1:
127 case KEY_RSA: 129 case KEY_RSA: