From ff361b0352669714657712f4fc86081e4483f36c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 2 Nov 2009 16:42:33 +0100 Subject: [PATCH] avoid orphan memory in testls --- bacula/src/tools/dbcheck.c | 2 ++ bacula/src/tools/testfind.c | 1 + bacula/src/tools/testls.c | 1 + 3 files changed, 4 insertions(+) diff --git a/bacula/src/tools/dbcheck.c b/bacula/src/tools/dbcheck.c index 924fcfc5f2..c548364dbf 100644 --- a/bacula/src/tools/dbcheck.c +++ b/bacula/src/tools/dbcheck.c @@ -138,6 +138,7 @@ int main (int argc, char *argv[]) setlocale(LC_ALL, ""); bindtextdomain("bacula", LOCALEDIR); textdomain("bacula"); + lmgr_init_thread(); my_name_is(argc, argv, "dbcheck"); init_msg(NULL, NULL); /* setup message handler */ @@ -325,6 +326,7 @@ int main (int argc, char *argv[]) db_close_database(NULL, db); close_msg(NULL); term_msg(); + lmgr_cleanup_main(); return 0; } diff --git a/bacula/src/tools/testfind.c b/bacula/src/tools/testfind.c index 35cccba2b0..e3cd6c6d07 100644 --- a/bacula/src/tools/testfind.c +++ b/bacula/src/tools/testfind.c @@ -243,6 +243,7 @@ main (int argc, char *const *argv) term_msg(); close_memory_pool(); + lmgr_cleanup_main(); sm_dump(false); exit(0); } diff --git a/bacula/src/tools/testls.c b/bacula/src/tools/testls.c index e9751e596e..d09b5d0db2 100644 --- a/bacula/src/tools/testls.c +++ b/bacula/src/tools/testls.c @@ -173,6 +173,7 @@ main (int argc, char *const *argv) free_jcr(jcr); term_last_jobs_list(); /* free jcr chain */ close_memory_pool(); + lmgr_cleanup_main(); sm_dump(false); exit(0); } -- 2.39.5