diff mbox

fix: classification: uninitialized pmr param value

Message ID 1463140311-20478-1-git-send-email-bala.manoharan@linaro.org
State Accepted
Commit 8387987f8c568f77d662aa8a79fc753c3d1a3dfe
Headers show

Commit Message

Balasubramanian Manoharan May 13, 2016, 11:51 a.m. UTC
Fix memory leaked caused by uninitialized pmr param struct

Fixes: https://bugs.linaro.org/show_bug.cgi?id=2227
 
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 test/validation/classification/odp_classification_test_pmr.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bill Fischofer May 14, 2016, 5:36 p.m. UTC | #1
short log should be linux-generic: classification: etc. Can be fixed during
merge?

On Fri, May 13, 2016 at 6:51 AM, Balasubramanian Manoharan <
bala.manoharan@linaro.org> wrote:

> Fix memory leaked caused by uninitialized pmr param struct

>

> Fixes: https://bugs.linaro.org/show_bug.cgi?id=2227

>

> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

>  test/validation/classification/odp_classification_test_pmr.c | 3 +++

>  1 file changed, 3 insertions(+)

>

> diff --git a/test/validation/classification/odp_classification_test_pmr.c

> b/test/validation/classification/odp_classification_test_pmr.c

> index 344503a..7c7d07e 100644

> --- a/test/validation/classification/odp_classification_test_pmr.c

> +++ b/test/validation/classification/odp_classification_test_pmr.c

> @@ -250,6 +250,7 @@ void classification_test_pmr_term_tcp_sport(void)

>         cos = odp_cls_cos_create(cosname, &cls_param);

>         CU_ASSERT_FATAL(cos != ODP_COS_INVALID);

>

> +       odp_cls_pmr_param_init(&pmr_param);

>         pmr_param.term = ODP_PMR_TCP_SPORT;

>         pmr_param.match.value = &val;

>         pmr_param.match.mask = &mask;

> @@ -474,6 +475,7 @@ void classification_test_pmr_term_udp_sport(void)

>         cos = odp_cls_cos_create(cosname, &cls_param);

>         CU_ASSERT_FATAL(cos != ODP_COS_INVALID);

>

> +       odp_cls_pmr_param_init(&pmr_param);

>         pmr_param.term = ODP_PMR_UDP_SPORT;

>         pmr_param.match.value = &val;

>         pmr_param.match.mask = &mask;

> @@ -690,6 +692,7 @@ void classification_test_pmr_term_dmac(void)

>         cos = odp_cls_cos_create(cosname, &cls_param);

>         CU_ASSERT_FATAL(cos != ODP_COS_INVALID);

>

> +       odp_cls_pmr_param_init(&pmr_param);

>         pmr_param.term = ODP_PMR_DMAC;

>         pmr_param.match.value = &val;

>         pmr_param.match.mask = &mask;

> --

> 1.9.1

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Maxim Uvarov May 16, 2016, 2:27 p.m. UTC | #2
On 05/14/16 20:36, Bill Fischofer wrote:
> short log should be linux-generic: classification: etc. Can be fixed 
> during merge?
yes, fixed and merged,
Maxim.


>
> On Fri, May 13, 2016 at 6:51 AM, Balasubramanian Manoharan 
> <bala.manoharan@linaro.org <mailto:bala.manoharan@linaro.org>> wrote:
>
>     Fix memory leaked caused by uninitialized pmr param struct
>
>     Fixes: https://bugs.linaro.org/show_bug.cgi?id=2227
>
>     Signed-off-by: Balasubramanian Manoharan
>     <bala.manoharan@linaro.org <mailto:bala.manoharan@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>      test/validation/classification/odp_classification_test_pmr.c | 3 +++
>      1 file changed, 3 insertions(+)
>
>     diff --git
>     a/test/validation/classification/odp_classification_test_pmr.c
>     b/test/validation/classification/odp_classification_test_pmr.c
>     index 344503a..7c7d07e 100644
>     --- a/test/validation/classification/odp_classification_test_pmr.c
>     +++ b/test/validation/classification/odp_classification_test_pmr.c
>     @@ -250,6 +250,7 @@ void classification_test_pmr_term_tcp_sport(void)
>             cos = odp_cls_cos_create(cosname, &cls_param);
>             CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
>
>     +       odp_cls_pmr_param_init(&pmr_param);
>             pmr_param.term = ODP_PMR_TCP_SPORT;
>             pmr_param.match.value = &val;
>             pmr_param.match.mask = &mask;
>     @@ -474,6 +475,7 @@ void classification_test_pmr_term_udp_sport(void)
>             cos = odp_cls_cos_create(cosname, &cls_param);
>             CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
>
>     +       odp_cls_pmr_param_init(&pmr_param);
>             pmr_param.term = ODP_PMR_UDP_SPORT;
>             pmr_param.match.value = &val;
>             pmr_param.match.mask = &mask;
>     @@ -690,6 +692,7 @@ void classification_test_pmr_term_dmac(void)
>             cos = odp_cls_cos_create(cosname, &cls_param);
>             CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
>
>     +       odp_cls_pmr_param_init(&pmr_param);
>             pmr_param.term = ODP_PMR_DMAC;
>             pmr_param.match.value = &val;
>             pmr_param.match.mask = &mask;
>     --
>     1.9.1
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/validation/classification/odp_classification_test_pmr.c b/test/validation/classification/odp_classification_test_pmr.c
index 344503a..7c7d07e 100644
--- a/test/validation/classification/odp_classification_test_pmr.c
+++ b/test/validation/classification/odp_classification_test_pmr.c
@@ -250,6 +250,7 @@  void classification_test_pmr_term_tcp_sport(void)
 	cos = odp_cls_cos_create(cosname, &cls_param);
 	CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
 
+	odp_cls_pmr_param_init(&pmr_param);
 	pmr_param.term = ODP_PMR_TCP_SPORT;
 	pmr_param.match.value = &val;
 	pmr_param.match.mask = &mask;
@@ -474,6 +475,7 @@  void classification_test_pmr_term_udp_sport(void)
 	cos = odp_cls_cos_create(cosname, &cls_param);
 	CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
 
+	odp_cls_pmr_param_init(&pmr_param);
 	pmr_param.term = ODP_PMR_UDP_SPORT;
 	pmr_param.match.value = &val;
 	pmr_param.match.mask = &mask;
@@ -690,6 +692,7 @@  void classification_test_pmr_term_dmac(void)
 	cos = odp_cls_cos_create(cosname, &cls_param);
 	CU_ASSERT_FATAL(cos != ODP_COS_INVALID);
 
+	odp_cls_pmr_param_init(&pmr_param);
 	pmr_param.term = ODP_PMR_DMAC;
 	pmr_param.match.value = &val;
 	pmr_param.match.mask = &mask;