* [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue
@ 2018-01-22 14:14 Jasvinder Singh
2018-01-22 14:49 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Jasvinder Singh @ 2018-01-22 14:14 UTC (permalink / raw)
To: dev; +Cc: bernard.iremonger, john.mcnamara
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 <jasvinder.singh@intel.com>
---
lib/librte_flow_classify/rte_flow_classify.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
index 6fa6a74..55492a6 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;
}
--
2.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue
2018-01-22 14:14 [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue Jasvinder Singh
@ 2018-01-22 14:49 ` Ferruh Yigit
2018-01-25 22:30 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-01-22 14:49 UTC (permalink / raw)
To: Jasvinder Singh, dev; +Cc: bernard.iremonger, john.mcnamara
On 1/22/2018 2:14 PM, Jasvinder Singh wrote:
> 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 <jasvinder.singh@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> lib/librte_flow_classify/rte_flow_classify.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c
> index 6fa6a74..55492a6 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;
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue
2018-01-22 14:49 ` Ferruh Yigit
@ 2018-01-25 22:30 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-01-25 22:30 UTC (permalink / raw)
To: Jasvinder Singh; +Cc: dev, Ferruh Yigit, bernard.iremonger, john.mcnamara
22/01/2018 15:49, Ferruh Yigit:
> On 1/22/2018 2:14 PM, Jasvinder Singh wrote:
> > 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 <jasvinder.singh@intel.com>
>
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
Note: lib/librte_ is not needed in the title beginning.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-25 22:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 14:14 [dpdk-dev] [PATCH] lib/librte_flow_classify: fix memory leak issue Jasvinder Singh
2018-01-22 14:49 ` Ferruh Yigit
2018-01-25 22:30 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).