From b89bd39fd949dbed8565e11e690372e0dea19c5f Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 24 Oct 2008 17:24:06 -0700 Subject: [PATCH] Fix leaking of flows when output action validation fails. When action validation fails from a flow add, the flow would be leaked. This caused the kmem cache (which handles allocating flow entries) to be unhappy when we try to unload the OpenFlow module. Thanks to Brandon Heller for catching this. --- datapath/forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/forward.c b/datapath/forward.c index ea53d154..dc7df714 100644 --- a/datapath/forward.c +++ b/datapath/forward.c @@ -224,7 +224,7 @@ add_flow(struct sw_chain *chain, const struct sender *sender, if (v_code != ACT_VALIDATION_OK) { dp_send_error_msg(chain->dp, sender, OFPET_BAD_ACTION, v_code, ofm, ntohs(ofm->header.length)); - goto error; + goto error_free_flow; } /* Fill out flow. */ -- 2.30.2