From: Jasvinder Singh Date: Mon, 22 Jan 2018 14:14:28 +0000 (+0000) Subject: flow_classify: fix memory leak in rule add X-Git-Tag: spdx-start~5 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ee7937ea69213aebf9aafc8ba81c41e942ad6912;p=dpdk.git flow_classify: fix memory leak in rule add 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 Reviewed-by: Ferruh Yigit --- diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c index 6fa6a74bed..55492a689d 100644 --- a/lib/librte_flow_classify/rte_flow_classify.c +++ b/lib/librte_flow_classify/rte_flow_classify.c @@ -560,6 +560,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, return rule; } } + free(rule); return NULL; }