ofproto: Fix use-after-free in bridge destruction with groups.
[cascardo/ovs.git] / ofproto / ofproto-dpif.c
index 6cdaa32..0ace36d 100644 (file)
@@ -1410,6 +1410,7 @@ destruct(struct ofproto *ofproto_)
             ofproto_rule_delete(&ofproto->up, &rule->up);
         }
     }
+    ofproto_group_delete_all(&ofproto->up);
 
     guarded_list_pop_all(&ofproto->pins, &pins);
     LIST_FOR_EACH_POP (pin, list_node, &pins) {