From cdfcd49659a8ec3962a0de82ab306065c547481a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 13 Dec 2010 12:25:01 -0800 Subject: [PATCH] ofproto: Fix use-after-free error in facet_revalidate(). Found by valgrind. --- ofproto/ofproto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c7f211ae..8b52b80a 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2478,8 +2478,6 @@ facet_revalidate(struct ofproto *ofproto, struct facet *facet) facet_flush_stats(ofproto, facet); } - ofpbuf_delete(odp_actions); - /* Update 'facet' now that we've taken care of all the old state. */ facet->tags = ctx.tags; facet->nf_flow.output_iface = ctx.nf_output_iface; @@ -2497,6 +2495,8 @@ facet_revalidate(struct ofproto *ofproto, struct facet *facet) facet->used = new_rule->created; } + ofpbuf_delete(odp_actions); + return true; } -- 2.30.2