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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171218112038.15626e20@xeon-e3>
Date:   Mon, 18 Dec 2017 11:20:38 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Shreeya Patel <shreeya.patel23498@...il.com>
Cc:     samuel@...tiz.org, gregkh@...uxfoundation.org,
        netdev@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: irda: Do not check for NOT NULL before kfree()

On Tue, 19 Dec 2017 00:41:30 +0530
Shreeya Patel <shreeya.patel23498@...il.com> wrote:

> Do not check for NOT NULL before calling kfree because if the
> pointer is NULL, no action occurs.
> Done using the following semantic patch by coccinelle.
> 
> @@
> expression ptr;
> @@
> 
> - if (ptr != NULL) {
>   kfree(ptr);
>   ptr = NULL;
> - }
> 
> The semantic patch has the effect of adding an assignment
> of ptr to NULL in the case where ptr is NULL already.
> 
> Signed-off-by: Shreeya Patel <shreeya.patel23498@...il.com>

Please read drivers/staging/irda/TODO

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ