From: Owen Hilyard Date: Wed, 23 Jun 2021 17:07:07 +0000 (-0400) Subject: flow_classify: fix leaking rules on delete X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=016441e3c770b65774d658c94a82c5bf5ed826fe;p=dpdk.git flow_classify: fix leaking rules on delete Rules in a classify table were not freed if the table had a delete function. Fixes: be41ac2a330f ("flow_classify: introduce flow classify library") Cc: stable@dpdk.org Signed-off-by: Owen Hilyard Acked-by: Bernard Iremonger --- diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c index f125267e8f..d3ba2ed227 100644 --- a/lib/flow_classify/rte_flow_classify.c +++ b/lib/flow_classify/rte_flow_classify.c @@ -579,12 +579,12 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls, &rule->u.key.key_del, &rule->key_found, &rule->entry); - + if (ret == 0) + free(rule); return ret; } } } - free(rule); return ret; }