diff options
author | martijn <martijn@openbsd.org> | 2020-12-20 14:06:12 +0000 |
---|---|---|
committer | Gilles CHEHADE <gilles@poolp.org> | 2020-12-21 09:18:12 +0100 |
commit | 19e59a3827595d664756276f47f4e0f9ba21989a (patch) | |
tree | 08faa827627074431731f7d7c75abfeff67d0396 | |
parent | Free filter_name in lka_filter_end (diff) | |
download | OpenSMTPD-19e59a3827595d664756276f47f4e0f9ba21989a.tar.xz OpenSMTPD-19e59a3827595d664756276f47f4e0f9ba21989a.zip |
Onlly call event_del if there are events enabled, since not all libevents
are created equal.
From gilles@
-rw-r--r-- | usr.sbin/smtpd/mproc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/mproc.c b/usr.sbin/smtpd/mproc.c index bde229e1..7f33a5a8 100644 --- a/usr.sbin/smtpd/mproc.c +++ b/usr.sbin/smtpd/mproc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mproc.c,v 1.36 2020/03/17 09:01:53 tobhe Exp $ */ +/* $OpenBSD: mproc.c,v 1.37 2020/12/20 14:06:12 martijn Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@faurot.net> @@ -90,7 +90,8 @@ mproc_clear(struct mproc *p) { log_debug("debug: clearing p=%s, fd=%d, pid=%d", p->name, p->imsgbuf.fd, p->pid); - event_del(&p->ev); + if (p->events) + event_del(&p->ev); close(p->imsgbuf.fd); imsg_clear(&p->imsgbuf); } |