From: Jeremy Harris Date: Wed, 14 Aug 2024 12:46:08 +0000 (+0100) Subject: safer coding of router toplevel X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/c657b20d9b1dfc2f437cc4ea220fa9ee7ba73088 safer coding of router toplevel --- diff --git a/src/src/deliver.c b/src/src/deliver.c index f383ab9be..0ba5f81b0 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6660,7 +6660,7 @@ int i, rc, final_yield, process_recipients; time_t now; address_item * addr_last; uschar * filter_message, * info; -open_db dbblock, * dbm_file; +open_db dbblock, * dbm_file = NULL; extern int acl_where; CONTINUED_ID: @@ -7469,9 +7469,7 @@ while (addr_new) /* Loop until all addresses dealt with */ queue run don't bother checking domain- or address-retry info; they will take effect on the second stage. */ - if (f.queue_2stage) - dbm_file = NULL; - else + if (!f.queue_2stage) { /* If we have transaction-capable hintsdbs, open the retry db without locking, and leave open for the transport process and for subsequent @@ -7925,7 +7923,7 @@ while (addr_new) /* Loop until all addresses dealt with */ if (dbm_file) if (exim_lockfile_needed()) - { dbfn_close(dbm_file); dbm_file = NULL; } + { dbfn_close(dbm_file); continue_retry_db = dbm_file = NULL; } else DEBUG(D_hints_lookup) debug_printf("retaining retry hintsdb handle\n");