]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: clear bgp_master at exit to help valgrind
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Feb 2017 12:40:00 +0000 (13:40 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Feb 2017 12:41:18 +0000 (13:41 +0100)
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>
bgpd/bgp_main.c

index ba59365a6ee9200000c31e43aa33daf2db35549f..979471dc495b0117b73d6ff45beb5f3b7e779b86 100644 (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);