mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 23:58:44 +00:00
ldpd: release all memory explicitly on exit
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
e2a534d557
commit
64dffe251a
@ -497,3 +497,11 @@ ldp_zebra_init(struct thread_master *master)
|
|||||||
zclient->redistribute_route_ipv6_add = ldp_zebra_read_route;
|
zclient->redistribute_route_ipv6_add = ldp_zebra_read_route;
|
||||||
zclient->redistribute_route_ipv6_del = ldp_zebra_read_route;
|
zclient->redistribute_route_ipv6_del = ldp_zebra_read_route;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ldp_zebra_destroy(void)
|
||||||
|
{
|
||||||
|
zclient_stop(zclient);
|
||||||
|
zclient_free(zclient);
|
||||||
|
zclient = NULL;
|
||||||
|
}
|
||||||
|
@ -453,6 +453,15 @@ ldpd_shutdown(void)
|
|||||||
free(iev_lde);
|
free(iev_lde);
|
||||||
|
|
||||||
log_info("terminating");
|
log_info("terminating");
|
||||||
|
|
||||||
|
vrf_terminate();
|
||||||
|
cmd_terminate();
|
||||||
|
vty_terminate();
|
||||||
|
ldp_zebra_destroy();
|
||||||
|
zprivs_terminate(&ldpd_privs);
|
||||||
|
thread_master_free(master);
|
||||||
|
closezlog(zlog_default);
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,6 +695,7 @@ extern struct thread_master *master;
|
|||||||
|
|
||||||
/* ldp_zebra.c */
|
/* ldp_zebra.c */
|
||||||
void ldp_zebra_init(struct thread_master *);
|
void ldp_zebra_init(struct thread_master *);
|
||||||
|
void ldp_zebra_destroy(void);
|
||||||
|
|
||||||
/* compatibility */
|
/* compatibility */
|
||||||
#ifndef __OpenBSD__
|
#ifndef __OpenBSD__
|
||||||
|
Loading…
Reference in New Issue
Block a user