From 0ee52bc2eaac199ba3ff05e07d899eb736213f3d Mon Sep 17 00:00:00 2001 From: Alexander Zhylin Date: Thu, 20 Aug 2026 18:32:21 +0300 Subject: [PATCH] dlist: fixes dlist_clear_list when dlist->start == NULL --- src/utils/dlist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils/dlist.c b/src/utils/dlist.c index 5b822e2..c2e6904 100644 --- a/src/utils/dlist.c +++ b/src/utils/dlist.c @@ -144,6 +144,8 @@ int dlist_clear_list(dlist_t *dlist, dblist_rm_cb_t cb) { dlist_node_t *current = dlist->start; dlist_node_t *next = NULL; + if (current == NULL) return 1; + do { cb(current->el_ptr); next = current->next;