vcl: unset fifo events only in read/write
[vpp.git] / src / vppinfra / bihash_template.c
index 8a6fa16..41d7c7c 100644 (file)
@@ -653,9 +653,16 @@ void BV (clib_bihash_foreach_key_value_pair)
                continue;
 
              (*fp) (&v->kvp[k], arg);
+             /*
+              * In case the callback deletes the last entry in the bucket...
+              */
+             if (BV (clib_bihash_bucket_is_empty) (b))
+               goto doublebreak;
            }
          v++;
        }
+    doublebreak:
+      ;
     }
 }