summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshoexer <hshoexer@openbsd.org>2006-06-17 10:06:21 +0000
committerhshoexer <hshoexer@openbsd.org>2006-06-17 10:06:21 +0000
commitb5b3e5716f6d33a81ce5bf1211aac87d7f086d8a (patch)
treea48902ff6ca4a93c9ea4b63ea31360ac3e7cdd07
parentadd serial ports attached through PC Cards to the list (diff)
downloadwireguard-openbsd-b5b3e5716f6d33a81ce5bf1211aac87d7f086d8a.tar.xz
wireguard-openbsd-b5b3e5716f6d33a81ce5bf1211aac87d7f086d8a.zip
Do not leak file descriptor in error path. From Andrey Matveev
<evol at online dot ptt dot ru>, thanks!
-rw-r--r--sbin/isakmpd/policy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index 0d371bc8f81..1b8bd77de96 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.87 2005/11/14 23:25:11 deraadt Exp $ */
+/* $OpenBSD: policy.c,v 1.88 2006/06/17 10:06:21 hshoexer Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -2200,6 +2200,7 @@ keynote_cert_obtain(u_int8_t *id, size_t id_len, void *data, u_int8_t **cert,
log_error("keynote_cert_obtain: failed to allocate %lu bytes",
(unsigned long)size);
free(file);
+ close(fd);
return 0;
}