X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fdlist.h;h=e445b39f336aeecb12954f867a713b4033eb8c02;hb=32e1c010b0c34fd0984f7fc45fae648a182025c5;hp=7d09b2bbc7e32d5997e761924fcb90841478de6b;hpb=6f692d6e5a8ffc920a728372ef773199bc5466c0;p=vpp.git diff --git a/src/vppinfra/dlist.h b/src/vppinfra/dlist.h index 7d09b2bbc7e..e445b39f336 100644 --- a/src/vppinfra/dlist.h +++ b/src/vppinfra/dlist.h @@ -121,7 +121,7 @@ clib_dlist_remove_head (dlist_elt_t * pool, u32 head_index) ASSERT (head->value == ~0); - if (head->next == ~0) + if (head->next == ~0 || (head->next == head_index)) return ~0; rv = head->next;