[dpdk-dev] [PATCH] lib/flow_classify: fix leaking rules on delete

ohilyard at iol.unh.edu ohilyard at iol.unh.edu
Wed Jun 16 21:57:23 CEST 2021


From: Owen Hilyard <ohilyard at iol.unh.edu>

Rules in a classify table were not freed if the table
had a delete function.

Fixes: be41ac2a3 ("flow_classify: introduce flow classify library")

Signed-off-by: Owen Hilyard <ohilyard at iol.unh.edu>
---
 lib/flow_classify/rte_flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/flow_classify/rte_flow_classify.c b/lib/flow_classify/rte_flow_classify.c
index f125267e8..06aed3b70 100644
--- a/lib/flow_classify/rte_flow_classify.c
+++ b/lib/flow_classify/rte_flow_classify.c
@@ -579,7 +579,7 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls,
 						&rule->u.key.key_del,
 						&rule->key_found,
 						&rule->entry);
-
+				free(rule);
 				return ret;
 			}
 		}
-- 
2.30.2



More information about the dev mailing list