- 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
This commit is contained in:
Damien Miller 2006-03-26 14:02:16 +11:00
parent 96937bd914
commit 429fcc23db
2 changed files with 7 additions and 1 deletions

View File

@ -61,6 +61,10 @@
memory leaks detected by Coverity via elad AT netbsd.org; memory leaks detected by Coverity via elad AT netbsd.org;
deraadt@ ok deraadt@ ok
that should be all of them now that should be all of them now
- 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
20060325 20060325
- OpenBSD CVS Sync - OpenBSD CVS Sync
@ -4318,4 +4322,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.4258 2006/03/26 03:01:54 djm Exp $ $Id: ChangeLog,v 1.4259 2006/03/26 03:02:16 djm Exp $

2
key.c
View File

@ -122,6 +122,8 @@ key_new_private(int type)
void void
key_free(Key *k) key_free(Key *k)
{ {
if (k == NULL)
fatal("key_free: key is NULL);
switch (k->type) { switch (k->type) {
case KEY_RSA1: case KEY_RSA1:
case KEY_RSA: case KEY_RSA: