aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/dlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/dlist.h')
-rw-r--r--src/vppinfra/dlist.h2
1 files changed, 1 insertions, 1 deletions
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;