vppinfra: loop counter off by 1 in search_free_list()
[vpp.git] / src / vppinfra / heap.c
index f7b1f6b..d48136c 100644 (file)
@@ -306,7 +306,7 @@ search_free_list (void *v, uword size)
            if ((s = f_size - size) >= 0)
              break;
          }
-       while (l >= 0);
+       while (l > 0);
 
        /* If we fail to find a large enough object, try the next larger size. */
        if (l < 0)