diff options
Diffstat (limited to 'sbin/dhcp6leased/dhcp6leased.c')
-rw-r--r-- | sbin/dhcp6leased/dhcp6leased.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/dhcp6leased/dhcp6leased.c b/sbin/dhcp6leased/dhcp6leased.c index 50ce64edf23..ae29f5a9436 100644 --- a/sbin/dhcp6leased/dhcp6leased.c +++ b/sbin/dhcp6leased/dhcp6leased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leased.c,v 1.18 2024/11/21 13:21:33 claudio Exp $ */ +/* $OpenBSD: dhcp6leased.c,v 1.19 2024/11/21 13:35:20 claudio Exp $ */ /* * Copyright (c) 2017, 2021, 2024 Florian Obser <florian@openbsd.org> @@ -260,9 +260,13 @@ main(int argc, char *argv[]) if ((iev_frontend = malloc(sizeof(struct imsgev))) == NULL || (iev_engine = malloc(sizeof(struct imsgev))) == NULL) fatal(NULL); - imsgbuf_init(&iev_frontend->ibuf, pipe_main2frontend[0]); + if (imsgbuf_init(&iev_frontend->ibuf, pipe_main2frontend[0]) == -1) + fatal(NULL); + imsgbuf_allow_fdpass(&iev_frontend->ibuf); iev_frontend->handler = main_dispatch_frontend; - imsgbuf_init(&iev_engine->ibuf, pipe_main2engine[0]); + if (imsgbuf_init(&iev_engine->ibuf, pipe_main2engine[0]) == -1) + fatal(NULL); + imsgbuf_allow_fdpass(&iev_engine->ibuf); iev_engine->handler = main_dispatch_engine; /* Setup event handlers for pipes to engine & frontend. */ |