tests/testcli: cleanup at exit

Call the proper termination functions so we can see memory leaks.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-01-26 21:57:58 +01:00
parent dd03f8cae1
commit 3a8b1ac043

View File

@ -49,6 +49,12 @@ int dump_args(struct vty *vty, const char *descr,
static void vty_do_exit(void) static void vty_do_exit(void)
{ {
printf ("\nend.\n"); printf ("\nend.\n");
cmd_terminate ();
vty_terminate ();
thread_master_free (master);
closezlog (zlog_default);
log_memstats_stderr ("testcli");
exit (0); exit (0);
} }