summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpctl
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpctl')
-rw-r--r--usr.sbin/ldpctl/ldpctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c
index 5319bcf9aeb..64bf4e792da 100644
--- a/usr.sbin/ldpctl/ldpctl.c
+++ b/usr.sbin/ldpctl/ldpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpctl.c,v 1.36 2024/11/21 13:26:25 claudio Exp $
+/* $OpenBSD: ldpctl.c,v 1.37 2024/11/21 13:38:14 claudio Exp $
*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -101,7 +101,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 */