forked from Mirror/frr
zebra: More memory free up on shutdown
a) nl_batch_tx_buf was not being freed b) the mlag_fifo was not being freed c) the vrf->ns_ctxt was not being freed Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
150e3ea26d
commit
c416603235
|
@ -1924,8 +1924,11 @@ void kernel_terminate(struct zebra_ns *zns, bool complete)
|
|||
/* During zebra shutdown, we need to leave the dataplane socket
|
||||
* around until all work is done.
|
||||
*/
|
||||
if (complete)
|
||||
if (complete) {
|
||||
kernel_nlsock_fini(&zns->netlink_dplane_out);
|
||||
|
||||
XFREE(MTYPE_NL_BUF, nl_batch_tx_buf);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -627,6 +627,8 @@ void zebra_mlag_init(void)
|
|||
|
||||
void zebra_mlag_terminate(void)
|
||||
{
|
||||
stream_fifo_free(zrouter.mlag_info.mlag_fifo);
|
||||
zrouter.mlag_info.mlag_fifo = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -265,6 +265,12 @@ static int zebra_vrf_delete(struct vrf *vrf)
|
|||
|
||||
otable_fini(&zvrf->other_tables);
|
||||
XFREE(MTYPE_ZEBRA_VRF, zvrf);
|
||||
|
||||
if (vrf->ns_ctxt) {
|
||||
ns_delete(vrf->ns_ctxt);
|
||||
vrf->ns_ctxt = NULL;
|
||||
}
|
||||
|
||||
vrf->info = NULL;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue