This seems to be a copy and paste bug that iterates and frees
the wrong table. This commit fixes that.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10730
Signed-off-by: Yifeng Sun <pkusunyif...@gmail.com>
---
 ovn/lib/extend-table.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ovn/lib/extend-table.c b/ovn/lib/extend-table.c
index 511d1a84b0c0..aba0b2e68b2c 100644
--- a/ovn/lib/extend-table.c
+++ b/ovn/lib/extend-table.c
@@ -39,8 +39,8 @@ ovn_extend_table_destroy(struct ovn_extend_table *table)
     bitmap_free(table->table_ids);
 
     struct ovn_extend_table_info *desired, *d_next;
-    HMAP_FOR_EACH_SAFE (desired, d_next, hmap_node, &table->existing) {
-        hmap_remove(&table->existing, &desired->hmap_node);
+    HMAP_FOR_EACH_SAFE (desired, d_next, hmap_node, &table->desired) {
+        hmap_remove(&table->desired, &desired->hmap_node);
         free(desired->name);
         free(desired);
     }
-- 
2.7.4

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to