From 23ac3451dcd6044c936592f63a872e3c35376183 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 16 Dec 2016 22:13:41 +0000 Subject: [PATCH] bgpd, lib: fix bgpd core on startup Signed-off-by: Quentin Young --- bgpd/bgpd.c | 1 + lib/qobj.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 5ed630b49d9e..c886914fc00f 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -7493,6 +7493,7 @@ bgp_master_init (void) /* Enable multiple instances by default. */ bgp_option_set (BGP_OPT_MULTIPLE_INSTANCE); + qobj_init (); QOBJ_REG (bm, bgp_master); } diff --git a/lib/qobj.c b/lib/qobj.c index aeae52e02974..8a386d24862e 100644 --- a/lib/qobj.c +++ b/lib/qobj.c @@ -73,7 +73,8 @@ void *qobj_get_typed(uint64_t id, struct qobj_nodetype *type) void qobj_init (void) { - nodes = hash_create (qobj_key, qobj_cmp); + if (!nodes) + nodes = hash_create (qobj_key, qobj_cmp); } void qobj_finish (void)