diff mbox

[PATCHv2] validation: fixed memory leak in odp_cpumask.c

Message ID 1426852851-20368-1-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 93989e794eda5000170df8bdcbf407e3689ebde1
Headers show

Commit Message

Christophe Milard March 20, 2015, noon UTC
CID 88273:  Resource leaks  (RESOURCE_LEAK)

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---

now with CID in comments.

 test/validation/odp_cpumask.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bill Fischofer March 21, 2015, 12:02 a.m. UTC | #1
On Fri, Mar 20, 2015 at 7:00 AM, Christophe Milard <
christophe.milard@linaro.org> wrote:

> CID 88273:  Resource leaks  (RESOURCE_LEAK)
>
> Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
>

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


> ---
>
> now with CID in comments.
>
>  test/validation/odp_cpumask.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/test/validation/odp_cpumask.c b/test/validation/odp_cpumask.c
> index 2285034..b7e18d6 100644
> --- a/test/validation/odp_cpumask.c
> +++ b/test/validation/odp_cpumask.c
> @@ -148,6 +148,9 @@ static void test_odp_cpumask_to_from_str(void)
>
>         CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_CPU_0,
>                                 stringlen(TEST_MASK_CPU_0) + 1);
> +
> +       free(buf_out);
> +       free(buf_in);
>  }
>
>  static void test_odp_cpumask_equal(void)
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov March 23, 2015, 3:07 p.m. UTC | #2
Merged,
Maxim.

On 03/21/15 03:02, Bill Fischofer wrote:
>
>
> On Fri, Mar 20, 2015 at 7:00 AM, Christophe Milard 
> <christophe.milard@linaro.org <mailto:christophe.milard@linaro.org>> 
> wrote:
>
>     CID 88273:  Resource leaks  (RESOURCE_LEAK)
>
>     Signed-off-by: Christophe Milard <christophe.milard@linaro.org
>     <mailto:christophe.milard@linaro.org>>
>
>
> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>
>     now with CID in comments.
>
>      test/validation/odp_cpumask.c | 3 +++
>      1 file changed, 3 insertions(+)
>
>     diff --git a/test/validation/odp_cpumask.c
>     b/test/validation/odp_cpumask.c
>     index 2285034..b7e18d6 100644
>     --- a/test/validation/odp_cpumask.c
>     +++ b/test/validation/odp_cpumask.c
>     @@ -148,6 +148,9 @@ static void test_odp_cpumask_to_from_str(void)
>
>             CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_CPU_0,
>     stringlen(TEST_MASK_CPU_0) + 1);
>     +
>     +       free(buf_out);
>     +       free(buf_in);
>      }
>
>      static void test_odp_cpumask_equal(void)
>     --
>     1.9.1
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/validation/odp_cpumask.c b/test/validation/odp_cpumask.c
index 2285034..b7e18d6 100644
--- a/test/validation/odp_cpumask.c
+++ b/test/validation/odp_cpumask.c
@@ -148,6 +148,9 @@  static void test_odp_cpumask_to_from_str(void)
 
 	CU_ASSERT_NSTRING_EQUAL(buf_out, TEST_MASK_CPU_0,
 				stringlen(TEST_MASK_CPU_0) + 1);
+
+	free(buf_out);
+	free(buf_in);
 }
 
 static void test_odp_cpumask_equal(void)