summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-24 03:42:23 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2020-11-24 03:42:23 +0100
commit1678bc07467e6d977fc2f6bf830274ca92e0a6e5 (patch)
treefdbdc70d526b7dedabdabd9bed889f0fdc2e023e /conf
parentc9ae81656f97bcc55910e80b6f00d3ee9383d848 (diff)
Fix some failed asserts due to add_tail()
When config structures are copied due to template application, we need to reset list node structure before calling add_tail(). Thanks to Mikael Magnusson for patches.
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/conf/conf.c b/conf/conf.c
index b21d5213..6f64b541 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -573,6 +573,7 @@ cfg_copy_list(list *dest, list *src, unsigned node_size)
{
dn = cfg_alloc(node_size);
memcpy(dn, sn, node_size);
+ memset(dn, 0, sizeof(node));
add_tail(dest, dn);
}
}