diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-11-13 15:07:06 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-11-13 15:16:45 +0100 |
commit | c416603235c49455f93eaffdcbc0f3a96cca9389 (patch) | |
tree | 6515c6d225224d4be424f33972102c0dad23162a /zebra | |
parent | pimd: Free up link list on shutdown (diff) | |
download | frr-c416603235c49455f93eaffdcbc0f3a96cca9389.tar.xz frr-c416603235c49455f93eaffdcbc0f3a96cca9389.zip |
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>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/kernel_netlink.c | 5 | ||||
-rw-r--r-- | zebra/zebra_mlag.c | 2 | ||||
-rw-r--r-- | zebra/zebra_vrf.c | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 8b59ecd87..5c31362eb 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -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); + } } /* diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c index 7715eab0a..2eb4fb668 100644 --- a/zebra/zebra_mlag.c +++ b/zebra/zebra_mlag.c @@ -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; } diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index 25e651398..2adae61f5 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -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; |