lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 13 Nov 2022 20:32:44 +0900
From:   Kang Minchul <tegongkang@...il.com>
To:     Dan Williams <dan.j.williams@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Ira Weiny <ira.weiny@...el.com>
Cc:     nvdimm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ndtest: Remove redundant NULL check

2022년 11월 13일 (일) 오후 8:26, Kang Minchul <tegongkang@...il.com>님이 작성:
>
> This addresses cocci warning as follows:
> WARNING: NULL check before some freeing functions is not needed.
>
> Signed-off-by: Kang Minchul <tegongkang@...il.com>
> ---
>  tools/testing/nvdimm/test/ndtest.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/testing/nvdimm/test/ndtest.c b/tools/testing/nvdimm/test/ndtest.c
> index 01ceb98c15a0..de4bc34bc47b 100644
> --- a/tools/testing/nvdimm/test/ndtest.c
> +++ b/tools/testing/nvdimm/test/ndtest.c
> @@ -370,8 +370,7 @@ static void *ndtest_alloc_resource(struct ndtest_priv *p, size_t size,
>  buf_err:
>         if (__dma && size >= DIMM_SIZE)
>                 gen_pool_free(ndtest_pool, __dma, size);
> -       if (buf)
> -               vfree(buf);
> +       vfree(buf);
>         kfree(res);
>
>         return NULL;
> --
> 2.34.1
>

I just found an earlier discussion about the same patch as mine.
Please ignore this patch.

Thanks.

Kang Minchul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ