* Correctly set safi to prevent duplicate allocations
* Free previously allocated table->info before overwriting it
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
zrt = XCALLOC(MTYPE_ZEBRA_NS, sizeof(*zrt));
zrt->tableid = tableid;
zrt->afi = afi;
+ zrt->safi = safi;
zrt->ns_id = zvrf->zns->ns_id;
zrt->table =
(afi == AFI_IP6) ? srcdest_table_init() : route_table_init();
table->cleanup = zebra_rtable_node_cleanup;
zvrf->table[afi][safi] = table;
+ XFREE(MTYPE_RIB_TABLE_INFO, table->info);
info = XCALLOC(MTYPE_RIB_TABLE_INFO, sizeof(*info));
info->zvrf = zvrf;
info->afi = afi;