summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-03-24 13:43:01 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-03-24 13:43:01 +0000
commitc232fc99a00d3a472dbcc20ce863385815163fb4 (patch)
tree64e35c2b9344662a791d5043c61c06b39f341658
parent1d543e88007946609bd5c7d29bf660fbc18f3baa (diff)
Mark variables that are unused before release of store in the queue-list loop
-rw-r--r--doc/doc-txt/ChangeLog6
-rw-r--r--src/src/queue.c24
2 files changed, 12 insertions, 18 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index fc392f60e..651508b7c 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -148,9 +148,9 @@ JH/28 Ensure that variables possibly set during message acceptance are marked
dead before release of memory in the daemon loop. This stops complaints
about them when the debug_store option is enabled. Discovered specifically
for sender_rate_period, but applies to a whole set of variables.
- Do the same for the queue-runner loop, for variables set from spool
- message files. Do the same for the SMTP per-message loop, for certain
- variables indirectly set in ACL operations.
+ Do the same for the queue-runner and queue-list loops, for variables set
+ from spool message files. Do the same for the SMTP per-message loop, for
+ certain variables indirectly set in ACL operations.
JH/29 Bug 2250: Fix a longstanding bug in heavily-pipelined SMTP input (such
as a multi-recipient message from a mailinglist manager). The coding had
diff --git a/src/src/queue.c b/src/src/queue.c
index c9ce3a2c8..3ae2a70a9 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -854,7 +854,10 @@ if (option >= 8) option -= 8;
/* Now scan the chain and print information, resetting store used
each time. */
-for (reset_point = store_get(0); f; f = f->next)
+for (reset_point = store_get(0);
+ f;
+ spool_clear_header_globals(), store_reset(reset_point), f = f->next
+ )
{
int rc, save_errno;
int size = 0;
@@ -863,7 +866,8 @@ for (reset_point = store_get(0); f; f = f->next)
message_size = 0;
message_subdir[0] = f->dir_uschar;
rc = spool_read_header(f->text, FALSE, count <= 0);
- if (rc == spool_read_notopen && errno == ENOENT && count <= 0) goto next;
+ if (rc == spool_read_notopen && errno == ENOENT && count <= 0)
+ continue;
save_errno = errno;
env_read = (rc == spool_read_OK || rc == spool_read_hdrerror);
@@ -933,7 +937,7 @@ for (reset_point = store_get(0); f; f = f->next)
if (rc != spool_read_hdrerror)
{
printf("\n\n");
- goto next;
+ continue;
}
}
@@ -948,24 +952,14 @@ for (reset_point = store_get(0); f; f = f->next)
tree_node *delivered =
tree_search(tree_nonrecipients, recipients_list[i].address);
if (!delivered || option != 1)
- printf(" %s %s\n", (delivered != NULL)? "D":" ",
- recipients_list[i].address);
+ printf(" %s %s\n",
+ delivered ? "D" : " ", recipients_list[i].address);
if (delivered) delivered->data.val = TRUE;
}
if (option == 2 && tree_nonrecipients)
queue_list_extras(tree_nonrecipients);
printf("\n");
}
-
-next:
- received_protocol = NULL;
- sender_fullhost = sender_helo_name =
- sender_rcvhost = sender_host_address = sender_address = sender_ident = NULL;
- sender_host_authenticated = authenticated_sender = authenticated_id = NULL;
- interface_address = NULL;
- acl_var_m = NULL;
-
- store_reset(reset_point);
}
}