summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-12-07 00:19:16 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-12-07 00:19:16 +0000
commit93c6c6bfdf200581f3facb9ab9dafab86e5c7182 (patch)
tree356ef81985ab02428aed5b4214fbdcdc2e9b6828
parenta397ce0f220b0095c77ed10fad2a162efd9977c7 (diff)
set k->cert = NULL after freeing it
-rw-r--r--usr.bin/ssh/key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index 5add51594db..c5732709033 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.109 2013/12/06 13:39:49 markus Exp $ */
+/* $OpenBSD: key.c,v 1.110 2013/12/07 00:19:15 djm Exp $ */
/*
* read_bignum():
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1890,6 +1890,7 @@ key_drop_cert(Key *k)
return -1;
}
cert_free(k->cert);
+ k->cert = NULL;
k->type = key_type_plain(k->type);
return 0;
}