commit 7dd718d52e96bdfe89666c11ae5fa64c77a9551b parent a77008a68b7b375e3e2eceb2209315352fd13acc Author: hhvn <dev@hhvn.uk> Date: Thu, 5 May 2022 21:59:51 +0100 Return on list_free with null values, rather than abort Diffstat:
M | zygo.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/zygo.c b/zygo.c @@ -329,7 +329,8 @@ list_free(Elem **l) { size_t i; Elem *prev, *p; - zygo_assert(l && *l); + if (!l || !*l) + return; for (prev = *l, p = prev->next; p; p = p->next) { elem_free(prev); prev = p;