From 1b43ef029957d88fc7f36e28a175dea8a1d9cc1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Fri, 31 May 2013 03:45:28 +0200 Subject: [PATCH] Fix test/logging.c --- test/logging.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/logging.c b/test/logging.c index 45d36f2..8305ace 100644 --- a/test/logging.c +++ b/test/logging.c @@ -35,8 +35,9 @@ struct uc_log_modules modules = { int main(int argc, char *argv[]) { - struct uc_log_destination *dest = uc_log_new_stderr(UC_LL_INFO, 0); + struct uc_log_destination *dest; uc_log_init(&modules); + dest = uc_log_new_stderr(UC_LL_INFO, 0); uc_log_add_destination(dest); dest = uc_log_new_file("test.log", UC_LL_INFO, 1); uc_log_add_destination(dest); @@ -55,6 +56,8 @@ int main(int argc, char *argv[]) uc_log_module_set_loglevel(MAIN, UC_LL_WARNING); UC_LOGF( UC_LL_INFO, MAIN, "Test MAIN INFO 3\n" ); + uc_log_delete_destination(dest); + return 1; }