From: Maria Matejka Date: Sat, 17 Aug 2019 12:03:47 +0000 (+0200) Subject: Lists: fix a stupid sanitizer bug X-Git-Tag: v2.0.8~77^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e26a5195dd6c62e6f4b80d13b6ecd5f40ee68546;p=thirdparty%2Fbird.git Lists: fix a stupid sanitizer bug --- diff --git a/lib/lists.c b/lib/lists.c index c162a991c..8553ee27e 100644 --- a/lib/lists.c +++ b/lib/lists.c @@ -167,8 +167,12 @@ LIST_INLINE void replace_node(node *old, node *new) { EXPENSIVE_CHECK(check_list(NULL, old)); - ASSUME(new->prev == NULL); - ASSUME(new->next == NULL); + + if (old != new) + { + ASSUME(new->prev == NULL); + ASSUME(new->next == NULL); + } old->next->prev = new; old->prev->next = new;