summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorMoritz Jodeit <moritz@cvs.openbsd.org>2007-03-05 20:11:41 +0000
committerMoritz Jodeit <moritz@cvs.openbsd.org>2007-03-05 20:11:41 +0000
commit4c16e5fd939a3e95613d067c6fc7120f14e1befb (patch)
treecf098819b4eb25cdae496c620376e92ccfa5314c /sbin/isakmpd
parentab84e67e3cfa8957460557b89bb31b964d3a50bc (diff)
Set pointer to NULL after freeing it, so callers of
key_from_printable() are not fooled into using it afterwards. OK hshoexer@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/key.c b/sbin/isakmpd/key.c
index 19c8e11efa3..22ecf1c8029 100644
--- a/sbin/isakmpd/key.c
+++ b/sbin/isakmpd/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.24 2005/11/15 22:10:49 cloder Exp $ */
+/* $OpenBSD: key.c,v 1.25 2007/03/05 20:11:40 moritz Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -171,6 +171,7 @@ key_from_printable(int type, int private, char *key, u_int8_t **data,
if (hex2raw(key, *data, datalen)) {
log_error("key_from_printable: invalid hex key");
free(*data);
+ *data = NULL;
*datalenp = 0;
return;
}