summaryrefslogtreecommitdiffstats
path: root/zebra/zserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zserv.c')
-rw-r--r--zebra/zserv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c
index a48505a51..502186d22 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -616,11 +616,12 @@ static void zserv_client_free(struct zserv *client)
pthread_mutex_destroy(&client->ibuf_mtx);
/* Free bitmaps. */
- for (afi_t afi = AFI_IP; afi < AFI_MAX; afi++)
+ for (afi_t afi = AFI_IP; afi < AFI_MAX; afi++) {
for (int i = 0; i < ZEBRA_ROUTE_MAX; i++)
vrf_bitmap_free(client->redist[afi][i]);
- vrf_bitmap_free(client->redist_default);
+ vrf_bitmap_free(client->redist_default[afi]);
+ }
vrf_bitmap_free(client->ifinfo);
vrf_bitmap_free(client->ridinfo);
@@ -700,10 +701,11 @@ static struct zserv *zserv_client_create(int sock)
memory_order_relaxed);
/* Initialize flags */
- for (afi = AFI_IP; afi < AFI_MAX; afi++)
+ for (afi = AFI_IP; afi < AFI_MAX; afi++) {
for (i = 0; i < ZEBRA_ROUTE_MAX; i++)
client->redist[afi][i] = vrf_bitmap_init();
- client->redist_default = vrf_bitmap_init();
+ client->redist_default[afi] = vrf_bitmap_init();
+ }
client->ifinfo = vrf_bitmap_init();
client->ridinfo = vrf_bitmap_init();