summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-05-25 09:26:13 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-05-25 09:26:13 +0000
commit90fbbe742ef4c8ac2b6587ede862d2458ab79cae (patch)
tree28db6d06bdae1d9d2dd060c5268b9e9ad11d1a48
parent1ef10ceeed252dea14d089f37ab5fda2b1a87796 (diff)
I removed code in the last commit that is needed. Allocate rbuf now by
default or else we bomb on the first read access.
-rw-r--r--usr.sbin/ldpd/neighbor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/neighbor.c b/usr.sbin/ldpd/neighbor.c
index dbb30b4131e..ad445344ac4 100644
--- a/usr.sbin/ldpd/neighbor.c
+++ b/usr.sbin/ldpd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.13 2010/05/19 15:28:51 claudio Exp $ */
+/* $OpenBSD: neighbor.c,v 1.14 2010/05/25 09:26:12 claudio Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -229,6 +229,8 @@ nbr_new(u_int32_t nbr_id, u_int16_t lspace, struct iface *iface)
if ((nbr = calloc(1, sizeof(*nbr))) == NULL)
fatal("nbr_new");
+ if ((nbr->rbuf = calloc(1, sizeof(struct buf_read))) == NULL)
+ fatal("nbr_new");
nbr->state = NBR_STA_DOWN;
nbr->id.s_addr = nbr_id;