summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-11-17 11:14:52 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-11-17 11:14:52 +0000
commitd06ef69f7e5fbe2510a5e02c77b1e4c744a79f62 (patch)
treea12d99e2dee60e5f97c987e7aa49da7b95f95542
parent0db477176bfd86205292a0bf2c2ea684dfea407c (diff)
missing strdup() check, From: David Hill <dhill@mindcry.org>
-rw-r--r--usr.sbin/bgpctl/bgpctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index 0db49f27791..f8ea3d5681e 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.92 2005/10/19 12:32:17 henning Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.93 2005/11/17 11:14:51 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -418,7 +418,8 @@ show_neighbor_msg(struct imsg *imsg, enum neighbor_views nv)
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, "strdup");
ina.s_addr = p->remote_bgpid;
printf("BGP neighbor is %s, ", s);