From: Ben Pfaff Date: Wed, 4 Mar 2009 22:53:07 +0000 (-0800) Subject: secchan: Fix read-after-free error in OFPT_FLOW_MOD implementation. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f20159f4db16e52cf93b84edf2bcd2947a290ed;p=openvswitch secchan: Fix read-after-free error in OFPT_FLOW_MOD implementation. Found via valgrind. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index d019ad3a..6b03b1dd 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -1924,6 +1924,9 @@ modify_flow(struct ofproto *p, const struct ofp_flow_mod *ofm, return 0; } + if (rule->cr.wc.wildcards) { + p->need_revalidate = true; + } if (command == OFPFC_DELETE) { if (!rule->cr.wc.wildcards) { struct odp_flow odp_flow; @@ -1952,9 +1955,6 @@ modify_flow(struct ofproto *p, const struct ofp_flow_mod *ofm, cls_rule_moved(&p->cls, &old_rule->cr, &rule->cr); } - if (rule->cr.wc.wildcards) { - p->need_revalidate = true; - } return 0; }