summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2016-09-06 11:06:41 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2016-09-06 11:06:41 +0000
commit7e10ade60ac6b00e76e54b4bd7993620712f9bf3 (patch)
tree2690c5f72390ec6e16975ce1bf6777e289fc873c /libexec
parent7cefce90640e01a20742167d6b1737e0ac658ee0 (diff)
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"
Diffstat (limited to 'libexec')
-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;