From 0fbcca38574139f1cd8ba7506ee5e204be5f2da7 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 5 Nov 2015 08:51:25 +0100 Subject: [PATCH] core: clist - restet prev/next when removing from clist slot --- clist.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clist.h b/clist.h index 2f1f8b528d4..2b796e6ff4b 100644 --- a/clist.h +++ b/clist.h @@ -87,7 +87,9 @@ #define clist_rm_sublist(s, e, next, prev) \ do{\ (s)->prev->next=(e)->next; \ - (e)->next->prev=(s)->prev ; \ + (e)->next->prev=(s)->prev; \ + (s)->prev=NULL; \ + (e)->next=NULL; \ }while(0)