lib/librte_flow_classify: fix memory leak issue
PATCH 1/1 lib/librte_flow_classify: fix memory leak issue
Free allocated memory of the rule if not added to the table.
Fixes 50bdac5916d9 ("flow_classify: remove table id parameter from API")
Coverity issue: 257032
Signed-off-by Jasvinder Singh <[email protected]>
--- lib/librte_flow_classify/rte_flow_classify.c | 1 + 1 file changed, 1 insertion(+)
lib/librte_flow_classify/rte_flow_classify.c +1 -0
@@ -560,6 +560,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,return rule; } } +free (rule);return NULL ; }
Signature · 1 line
2.9.3
Quoted 6 lines · Jasvinder Singh
Free allocated memory of the rule if not added to the table.
Coverity issue: 257032
Fixes 50bdac5916d9 ("flow_classify: remove table id parameter from API")Signed-off-by Jasvinder Singh <[email protected]>
Reviewed-by Ferruh Yigit <[email protected]>
Quoted 17 lines
--- lib/librte_flow_classify/rte_flow_classify.c | 1 + 1 file changed, 1 insertion(+)lib/librte_flow_classify/rte_flow_classify.c +1
-0@@ -560,6 +560,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls,return rule; } } +free (rule);return NULL ; }
Thomas Monjalon
Applied22/01/2018 15:49, Ferruh Yigit:
Quoted 9 lines · Jasvinder Singh
Quoted 6 lines
Free allocated memory of the rule if not added to the table.
Coverity issue: 257032
Fixes 50bdac5916d9 ("flow_classify: remove table id parameter from API")Signed-off-by Jasvinder Singh <[email protected]>Reviewed-by Ferruh Yigit <[email protected]>
Applied, thanks
Note: lib/librte_ is not needed in the title beginning.