mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-14 20:31:52 +00:00
staticd: Fixing memory leak issue
Memory allotted for staticd specific vrf structers is not being deallocated when the corresponding vrf is destroyed. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
This commit is contained in:
parent
43086da665
commit
a4155a1b35
@ -73,6 +73,8 @@ static void sigint(void)
|
|||||||
{
|
{
|
||||||
zlog_notice("Terminating on signal");
|
zlog_notice("Terminating on signal");
|
||||||
|
|
||||||
|
static_vrf_terminate();
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,6 +111,7 @@ static int static_vrf_delete(struct vrf *vrf)
|
|||||||
svrf->stable[afi][safi] = NULL;
|
svrf->stable[afi][safi] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
XFREE(MTYPE_TMP, svrf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,3 +205,8 @@ void static_vrf_init(void)
|
|||||||
|
|
||||||
vrf_cmd_init(static_vrf_config_write, &static_privs);
|
vrf_cmd_init(static_vrf_config_write, &static_privs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void static_vrf_terminate(void)
|
||||||
|
{
|
||||||
|
vrf_terminate();
|
||||||
|
}
|
||||||
|
@ -35,4 +35,5 @@ void static_vrf_init(void);
|
|||||||
|
|
||||||
struct route_table *static_vrf_static_table(afi_t afi, safi_t safi,
|
struct route_table *static_vrf_static_table(afi_t afi, safi_t safi,
|
||||||
struct static_vrf *svrf);
|
struct static_vrf *svrf);
|
||||||
|
extern void static_vrf_terminate(void);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user