diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c index 639b0051f5..d5bcb35e1d 100644 --- a/lib/librte_flow_classify/rte_flow_classify.c +++ b/lib/librte_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; }