[dpdk-stable] [PATCH v2 3/3] test/hash: free allocated memory

David Marchand david.marchand at redhat.com
Fri Jun 28 10:38:40 CEST 2019


On Fri, Jun 28, 2019 at 6:53 AM Honnappa Nagarahalli <
honnappa.nagarahalli at arm.com> wrote:

> Free allocated memory.
>
> Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket")
> Cc: stable at dpdk.org
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
> ---
>  app/test/test_hash_readwrite_lf.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_hash_readwrite_lf.c
> b/app/test/test_hash_readwrite_lf.c
> index 12522e265..9b054dec0 100644
> --- a/app/test/test_hash_readwrite_lf.c
> +++ b/app/test/test_hash_readwrite_lf.c
>
>
[snip]

@@ -653,6 +656,8 @@ test_rwc_reader(__attribute__((unused)) void *arg)
>         cycles = rte_rdtsc_precise() - begin;
>         rte_atomic64_add(&gread_cycles, cycles);
>         rte_atomic64_add(&greads, read_cnt*loop_cnt);
> +
> +       rte_free(pos);
>         return 0;
>  }
>

In this function, there are three other places returning -1 without freeing
pos.


-- 
David Marchand


More information about the stable mailing list