From 9e27c9216d8300594f3beb4249a097720c3bddb1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 27 Jan 2021 13:33:52 +0000 Subject: [PATCH] control: log an error if we fail to remove the write callback --- src/control.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/control.c b/src/control.c index a601ad0a..794d4a12 100644 --- a/src/control.c +++ b/src/control.c @@ -84,7 +84,8 @@ control_free(struct fd_list *fd) fd->ctx->ps_control_client = NULL; #endif - eloop_event_remove_writecb(fd->ctx->eloop, fd->fd); + if (eloop_event_remove_writecb(fd->ctx->eloop, fd->fd) == -1) + logerr(__func__); TAILQ_REMOVE(&fd->ctx->control_fds, fd, next); control_queue_free(fd); free(fd); @@ -529,7 +530,8 @@ control_writeone(void *arg) if (TAILQ_FIRST(&fd->queue) != NULL) return; - eloop_event_remove_writecb(fd->ctx->eloop, fd->fd); + if (eloop_event_remove_writecb(fd->ctx->eloop, fd->fd) == -1) + logerr(__func__); #ifdef PRIVSEP if (IN_PRIVSEP_SE(fd->ctx) && !(fd->flags & FD_LISTEN)) { if (ps_ctl_sendeof(fd) == -1) -- 2.47.2