diff options
author | Damien Miller <djm@mindrot.org> | 2006-03-26 14:02:16 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-03-26 14:02:16 +1100 |
commit | 429fcc23db22469ca48d18ad4a2940a265965caf (patch) | |
tree | bfeb3aae0ac79c168f0470e5ad1aadfd1720dcab /key.c | |
parent | 96937bd9144f582330478ed5c5b76dd3286c46e4 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -122,6 +122,8 @@ key_new_private(int type) | |||
122 | void | 122 | void |
123 | key_free(Key *k) | 123 | key_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: |