summaryrefslogtreecommitdiff
path: root/sbin/isakmpd/policy.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2007-03-03 18:47:38 +0000
committerChad Loder <cloder@cvs.openbsd.org>2007-03-03 18:47:38 +0000
commitef1e5f37ce730c160ed6b3e4720cd7c4d638ee03 (patch)
treea306e3ba3c62428a2a3112409ea266e1bc8b35af /sbin/isakmpd/policy.c
parent5c92e5b597cce22b3ed92712f8441f6cada231e5 (diff)
keynote_cert_obtain should not leak in case of error. OK moritz@
Diffstat (limited to 'sbin/isakmpd/policy.c')
-rw-r--r--sbin/isakmpd/policy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index 1b8bd77de96..2fe0e7fd44b 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.88 2006/06/17 10:06:21 hshoexer Exp $ */
+/* $OpenBSD: policy.c,v 1.89 2007/03/03 18:47:37 cloder Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -2208,6 +2208,8 @@ keynote_cert_obtain(u_int8_t *id, size_t id_len, void *data, u_int8_t **cert,
LOG_DBG((LOG_POLICY, 30, "keynote_cert_obtain: "
"failed to read %lu bytes from \"%s\"",
(unsigned long)size, file));
+ free(cert);
+ cert = NULL;
free(file);
close(fd);
return 0;