diff options
| author | Roy Marples <roy@marples.name> | 2021-01-27 13:33:52 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2021-01-27 13:33:52 +0000 |
| commit | 9e27c9216d8300594f3beb4249a097720c3bddb1 (patch) | |
| tree | e0c99ee266df3e0f53c6d1951c0bc7d2984985ab | |
| parent | de92f37d6875a484a1bd65b8062095752aa3606b (diff) | |
| download | dhcpcd-9e27c9216d8300594f3beb4249a097720c3bddb1.tar.xz | |
control: log an error if we fail to remove the write callback
| -rw-r--r-- | src/control.c | 6 |
1 files 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) |
