From: W.C.A. Wijngaards Date: Thu, 23 Jan 2020 12:38:10 +0000 (+0100) Subject: dnstap io, fixup error exit of event add routines. X-Git-Tag: 1.11.0rc1~120^2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86e1948afed289b555834c9094fafaaf15df3a40;p=thirdparty%2Funbound.git dnstap io, fixup error exit of event add routines. --- diff --git a/dnstap/dtstream.c b/dnstap/dtstream.c index a81a7abd5..bbf202c57 100644 --- a/dnstap/dtstream.c +++ b/dnstap/dtstream.c @@ -674,6 +674,8 @@ static void dtio_add_output_event_read(struct dt_io_thread* dtio) ub_event_del_bits(dtio->event, UB_EV_WRITE); if(ub_event_add(dtio->event, NULL) != 0) { log_err("dnstap io: out of memory (adding event)"); + dtio->event_added = 0; + dtio->event_added_is_write = 0; return; } dtio->event_added = 1; @@ -693,6 +695,8 @@ static void dtio_add_output_event_write(struct dt_io_thread* dtio) ub_event_add_bits(dtio->event, UB_EV_WRITE); if(ub_event_add(dtio->event, NULL) != 0) { log_err("dnstap io: out of memory (adding event)"); + dtio->event_added = 0; + dtio->event_added_is_write = 0; return; } dtio->event_added = 1;