From: Michael Tremer Date: Mon, 11 May 2026 14:17:19 +0000 (+0000) Subject: main: Re-use the same cleanup handler on error X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a51f1f7997a537c671b112e4529048c16d0adca4;p=zone-sync.git main: Re-use the same cleanup handler on error Signed-off-by: Michael Tremer --- diff --git a/main.c b/main.c index 187ffc8..157e4f6 100644 --- a/main.c +++ b/main.c @@ -258,8 +258,8 @@ static isc_result_t zone_loaded(void* data) { return do_transfer(zone, serial); ERROR: - // Free the zone - dns_zone_detach(&zone); + // Destroy the zone + zone_done(zone); return r; } @@ -341,9 +341,7 @@ static void do_zone(const char* name) { ERROR: // Destroy the zone - dns_zone_detach(&zone); - - return; + zone_done(zone); } static void run_loop(void* data) {