From 24623c9175d3c1373cf70a0cb95d11b3c655a2e3 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 15 Aug 2013 17:54:04 -0700 Subject: [PATCH] ofproto-dpif: Fix bad pointer dereference when deleting a bridge. The 'pins' list contains packet-ins, not flow-mods. Introduced by commit ada3a58d1f8 (ofproto-dpif: Make packet_ins thread safe.). Signed-off-by: Ben Pfaff Acked-by: Ethan Jackson --- ofproto/ofproto-dpif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 4e953f413..0b7df80a6 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1418,7 +1418,7 @@ destruct(struct ofproto *ofproto_) { struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_); struct rule_dpif *rule, *next_rule; - struct ofputil_flow_mod *pin, *next_pin; + struct ofputil_packet_in *pin, *next_pin; struct ofputil_flow_mod *fm, *next_fm; struct oftable *table; @@ -1455,7 +1455,7 @@ destruct(struct ofproto *ofproto_) LIST_FOR_EACH_SAFE (pin, next_pin, list_node, &ofproto->pins) { list_remove(&pin->list_node); ofproto->n_pins--; - free(pin->ofpacts); + free(CONST_CAST(void *, pin->packet)); free(pin); } ovs_mutex_unlock(&ofproto->pin_mutex); -- 2.47.0