From bfa19379f746f92f4e9d5530bd71de9791b4a0dc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 10 Sep 2009 05:48:50 +0200 Subject: [PATCH] Fix possible termination problem --- bacula/src/lib/lockmgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bacula/src/lib/lockmgr.c b/bacula/src/lib/lockmgr.c index f8876e3bbc..60d83cff75 100644 --- a/bacula/src/lib/lockmgr.c +++ b/bacula/src/lib/lockmgr.c @@ -600,6 +600,9 @@ void lmgr_cleanup_main() { dlist *temp; + if (!global_mgr) { + return; + } pthread_cancel(undertaker); lmgr_cleanup_thread(); pthread_mutex_lock(&lmgr_global_mutex); -- 2.39.5