From 3a8b1ac043bc7be3cd8e1c58b977febd8cb6958d Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 26 Jan 2017 21:57:58 +0100 Subject: [PATCH] tests/testcli: cleanup at exit Call the proper termination functions so we can see memory leaks. Signed-off-by: David Lamparter --- tests/common-cli.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/common-cli.c b/tests/common-cli.c index 7f7d253e6c..47476711c6 100644 --- a/tests/common-cli.c +++ b/tests/common-cli.c @@ -49,6 +49,12 @@ int dump_args(struct vty *vty, const char *descr, static void vty_do_exit(void) { printf ("\nend.\n"); + cmd_terminate (); + vty_terminate (); + thread_master_free (master); + closezlog (zlog_default); + + log_memstats_stderr ("testcli"); exit (0); } -- 2.39.5