namedlist_block has to be allocated mutably, to cache lookups
authorJeremy Harris <jgh146exb@wizmail.org>
Thu, 13 May 2021 20:31:16 +0000 (21:31 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 27 Jun 2021 23:30:02 +0000 (00:30 +0100)
paniclog from 5 - subprocess crashes

src/src/readconf.c

index 4602dd262194d09196787db7d52ca50c82d7259f..0ad206172d4baa661cf5cfbcb6e764e66a029983 100644 (file)
@@ -3011,7 +3011,12 @@ read_named_list(tree_node **anchorp, int *numberp, int max, uschar *s,
 BOOL forcecache = FALSE;
 uschar *ss;
 tree_node *t;
-namedlist_block * nb = store_get(sizeof(namedlist_block), FALSE);
+int old_pool = store_pool;
+namedlist_block * nb;
+
+store_pool = POOL_PERM;
+nb = store_get(sizeof(namedlist_block), FALSE);
+store_pool = old_pool;
 
 if (Ustrncmp(s, "_cache", 6) == 0)
   {