summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.c2
-rw-r--r--lib/qobj.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 5ed630b49..30f6e0d85 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -7477,6 +7477,8 @@ bgp_config_write (struct vty *vty)
void
bgp_master_init (void)
{
+ qobj_init ();
+
memset (&bgp_master, 0, sizeof (struct bgp_master));
bm = &bgp_master;
diff --git a/lib/qobj.c b/lib/qobj.c
index aeae52e02..8a386d248 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)