From: Eric Bollengier Date: Mon, 2 Nov 2009 15:42:33 +0000 (+0100) Subject: avoid orphan memory in testls X-Git-Tag: Release-5.0.0~281^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ff361b0352669714657712f4fc86081e4483f36c;p=bacula%2Fbacula avoid orphan memory in testls --- 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); }