summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-05-20 12:17:05 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-05-20 12:17:05 +0000
commit7ef47b98d328b3681626c91cc0581745f7f1fa67 (patch)
tree92d336a46207033ca1c0c5bbaa6e31240ebdb98a
parent76f7ecb2e8da61cb63e957ebc7d99b87362cf9e8 (diff)
check for strdup(3) failure was missing in one case, catched by
Andrey Matveev <andrushock@korovino.net>
-rw-r--r--usr.sbin/bgpctl/bgpctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 3b457c34420..8b80109e553 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.57 2004/05/06 14:29:12 henning Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.58 2004/05/20 12:17:04 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -267,7 +267,9 @@ show_summary_msg(struct imsg *imsg)
p->conf.remote_masklen) == -1)
err(1, NULL);
} else
- s = strdup(log_addr(&p->conf.remote_addr));
+ if ((s = strdup(log_addr(&p->conf.remote_addr))) ==
+ NULL)
+ err(1, NULL);
printf("%-20s %5u %10llu %10llu %5u %-8s %s\n",
s, p->conf.remote_as,