bgpd: clear bgp_master at exit to help valgrind

bgp_master can retain pointers keeping allocated structures "reachable"
in valgrind.  Clear to 0 to tell valgrind that everything should've been
freed really.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-02-01 13:40:00 +01:00
parent b8438f6d0c
commit 46857efe0d

View File

@ -310,6 +310,8 @@ bgp_exit (int status)
if (zlog_default)
closezlog (zlog_default);
memset (bm, 0, sizeof (*bm));
if (bgp_debug_count())
log_memstats_stderr ("bgpd");
exit (status);