From: David Lamparter Date: Wed, 1 Feb 2017 12:40:00 +0000 (+0100) Subject: bgpd: clear bgp_master at exit to help valgrind X-Git-Tag: frr-2.0-rc2~22^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=46857efe0d453410a829f773c1be3fc91ec8f34d;p=mirror%2Ffrr.git 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 --- diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index ba59365a6e..979471dc49 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -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);