summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfctl/ospfctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ospfctl/ospfctl.c')
-rw-r--r--usr.sbin/ospfctl/ospfctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index ef6255a40e0..7fdd8f237e5 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.72 2024/11/21 13:26:25 claudio Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.73 2024/11/21 13:38:14 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -106,7 +106,8 @@ main(int argc, char *argv[])
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, NULL);
- imsgbuf_init(ibuf, ctl_sock);
+ if (imsgbuf_init(ibuf, ctl_sock) == -1)
+ err(1, NULL);
done = 0;
/* process user request */