From: Roy Marples Date: Sat, 10 Aug 2019 15:50:43 +0000 (+0100) Subject: Fix control queue free argument. X-Git-Tag: v8.0.3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=754e4de72fdda34e0969f7c4c2c3bb9b4c59e2fa;p=thirdparty%2Fdhcpcd.git Fix control queue free argument. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 5b64abf4..bddd316b 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1440,10 +1440,10 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx, struct fd_list *fd, * write callback on the fd */ if (strcmp(*argv, "--version") == 0) { return control_queue(fd, UNCONST(VERSION), - strlen(VERSION) + 1, 0); + strlen(VERSION) + 1, false); } else if (strcmp(*argv, "--getconfigfile") == 0) { return control_queue(fd, UNCONST(fd->ctx->cffile), - strlen(fd->ctx->cffile) + 1, 0); + strlen(fd->ctx->cffile) + 1, false); } else if (strcmp(*argv, "--getinterfaces") == 0) { eloop_event_add_w(fd->ctx->eloop, fd->fd, dhcpcd_getinterfaces, fd); diff --git a/src/script.c b/src/script.c index 9cb83e08..2e9a2f9b 100644 --- a/src/script.c +++ b/src/script.c @@ -647,8 +647,8 @@ send_listeners: TAILQ_FOREACH(fd, &ctx->control_fds, next) { if (!(fd->flags & FD_LISTEN)) continue; - if (control_queue(fd, ctx->script_buf, ctx->script_buflen, 1) - == -1) + if (control_queue(fd, ctx->script_buf, ctx->script_buflen, + true) == -1) logerr("%s: control_queue", __func__); else status = 1;