]> git.ipfire.org Git - zone-sync.git/commitdiff
main: Don't try to shutdown the event loop if it does not exist
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 May 2026 17:00:27 +0000 (17:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 18 May 2026 17:00:27 +0000 (17:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
main.c

diff --git a/main.c b/main.c
index 32cd52f95861c0631b4855e415968a04827856a7..52447a338ab01c765c9b00116cd1c56daeaa6c6a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -239,7 +239,8 @@ static void maybe_shutdown(void) {
 
        DEBUG("Shutting down...\n");
 
-       isc_loopmgr_shutdown(ctx.loopmgr);
+       if (ctx.loopmgr)
+               isc_loopmgr_shutdown(ctx.loopmgr);
 }
 
 static void zone_done(dns_zone_t* z) {