summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2016-09-06 11:06:40 +0000
committerhenning <henning@openbsd.org>2016-09-06 11:06:40 +0000
commit6437f37cae963f6423602c3f1c48c78bd9aa8c9d (patch)
tree9f274e55621a715186fea0d9a846e10aa17cc3da
parentremove code that allows pkg_create to sign (diff)
downloadwireguard-openbsd-6437f37cae963f6423602c3f1c48c78bd9aa8c9d.tar.xz
wireguard-openbsd-6437f37cae963f6423602c3f1c48c78bd9aa8c9d.zip
must close our fd unconditionally and not just in the !TLS case; tls_close
doesn't do that for us. found, analyzed and patch supplied by Martin Proyer <martin at proyer dot net>, many thanks! ok bcook funny since I just discussed a somewhat mysterious spamd-TLS issue with bob and brent over breakfast yesterday in cambridge - not sure it is this one, if it is I've been intensively digging in the wrong corner, almost "missing the obvious"
-rw-r--r--libexec/spamd/spamd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index e8b69aff19d..b205d3c87f0 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.143 2016/07/13 16:35:47 jsing Exp $ */
+/* $OpenBSD: spamd.c,v 1.144 2016/09/06 11:06:40 henning Exp $ */
/*
* Copyright (c) 2015 Henning Brauer <henning@openbsd.org>
@@ -765,8 +765,8 @@ closecon(struct con *cp)
if (cp->cctx) {
tls_close(cp->cctx);
tls_free(cp->cctx);
- } else
- close(cp->pfd->fd);
+ }
+ close(cp->pfd->fd);
cp->pfd->fd = -1;
slowdowntill = 0;