]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/readconf.c
router instance must be mutable
[user/henk/code/exim.git] / src / src / readconf.c
index 4602dd262194d09196787db7d52ca50c82d7259f..a18cb8bbbf5cbfa40502de91356f2019710b54b2 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)
   {
@@ -3770,7 +3775,12 @@ while ((buffer = get_config_line()))
     /* Set up a new driver instance data block on the chain, with
     its default values installed. */
 
+  {
+  int old_pool = store_pool;
+  if (Ustrncmp(class, "router", 7) == 0) store_pool = POOL_PERM;
     d = store_get(instance_size, FALSE);
+  store_pool = old_pool;
+  }
     memcpy(d, instance_default, instance_size);
     *p = d;
     p = &d->next;