mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 02:22:48 +00:00
pimd: Cleanup some small memory leaks on exit
We were not properly cleaning up some memory in the pim mlag subsystem. Clean it up on exit. Signed-off-by: Donald Sharp <sharpc@cumulusnetworks.com>
This commit is contained in:
parent
249df50a20
commit
892c2c4468
@ -1082,6 +1082,14 @@ void pim_instance_mlag_terminate(struct pim_instance *pim)
|
||||
pim->inst_mlag_intf_cnt = 0;
|
||||
}
|
||||
|
||||
void pim_mlag_terminate(void)
|
||||
{
|
||||
stream_free(router->mlag_stream);
|
||||
router->mlag_stream = NULL;
|
||||
stream_fifo_free(router->mlag_fifo);
|
||||
router->mlag_fifo = NULL;
|
||||
}
|
||||
|
||||
void pim_mlag_init(void)
|
||||
{
|
||||
pim_mlag_param_reset();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "pim_iface.h"
|
||||
|
||||
extern void pim_mlag_init(void);
|
||||
extern void pim_mlag_terminate(void);
|
||||
extern void pim_instance_mlag_init(struct pim_instance *pim);
|
||||
extern void pim_instance_mlag_terminate(struct pim_instance *pim);
|
||||
extern void pim_if_configure_mlag_dualactive(struct pim_interface *pim_ifp);
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "pim_vxlan.h"
|
||||
#include "pim_zlookup.h"
|
||||
#include "pim_zebra.h"
|
||||
#include "pim_mlag.h"
|
||||
|
||||
const char *const PIM_ALL_SYSTEMS = MCAST_ALL_SYSTEMS;
|
||||
const char *const PIM_ALL_ROUTERS = MCAST_ALL_ROUTERS;
|
||||
@ -109,6 +110,7 @@ void pim_router_init(void)
|
||||
|
||||
void pim_router_terminate(void)
|
||||
{
|
||||
pim_mlag_terminate();
|
||||
XFREE(MTYPE_ROUTER, router);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user