>From 55fed9438e24303de1633472a2a03015106d8914 Mon Sep 17 00:00:00 2001
From: Mikael Magnusson <mikma@users.sourceforge.net>
Date: Wed, 13 May 2020 19:06:50 +0200
Subject: [PATCH 1/2] Nest: Fix assert failed in channel_copy_config

Initializing n in the copy of the channel config fixes:
assertion 'n->prev == ((void *)0)' failed at ../lib/lists.c:79
---
 nest/proto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nest/proto.c b/nest/proto.c
index 41b3a6b9..b7a5c673 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -626,6 +626,7 @@ channel_copy_config(struct channel_config *src, struct proto_config *proto)
   struct channel_config *dst = cfg_alloc(src->channel->config_size);
 
   memcpy(dst, src, src->channel->config_size);
+  memset(&dst->n, 0, sizeof(struct node));
   add_tail(&proto->channels, &dst->n);
   CALL(src->channel->copy_config, dst, src);
 
-- 
2.25.1



