diff options
Diffstat (limited to 'usr.sbin/rad/rad.c')
-rw-r--r-- | usr.sbin/rad/rad.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/rad/rad.c b/usr.sbin/rad/rad.c index 11c7d154585..ae073db1758 100644 --- a/usr.sbin/rad/rad.c +++ b/usr.sbin/rad/rad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rad.c,v 1.37 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: rad.c,v 1.38 2024/11/21 13:38:15 claudio Exp $ */ /* * Copyright (c) 2018 Florian Obser <florian@openbsd.org> @@ -240,9 +240,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. */ |