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] [day] [month] [year] [list]
Message-ID: <CF479BD7-8340-4428-9466-8A7BB688BD28@nvidia.com>
Date:	Fri, 19 Oct 2012 16:53:54 +0200
From:	Philip Rakity <prakity@...dia.com>
To:	Sangho Yi <antiroot@...il.com>
CC:	"aaron.lu@....com" <aaron.lu@....com>,
	"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
	"paul.gortmaker@...driver.com" <paul.gortmaker@...driver.com>,
	"chuanxiao.dong@...el.com" <chuanxiao.dong@...el.com>,
	"cjb@...top.org" <cjb@...top.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH 1/2] mmc: core: bus.c: removed unnecessary NULL check
 for kfree(...)


On 19 Oct 2012, at 14:58, Sangho Yi <antiroot@...il.com> wrote:

> kfree(NULL) is safe so I removed the if statements for NULL check.
> 
> Signed-off-by: Sangho Yi <antiroot@...il.com>
> ---
> drivers/mmc/core/bus.c |    3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 9b68933..420cb67 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -225,8 +225,7 @@ static void mmc_release_card(struct device *dev)
> 
> 	sdio_free_common_cis(card);
> 
> -	if (card->info)
> -		kfree(card->info);
> +	kfree(card->info);
> 
> 	kfree(card);
> }
> -- 
> 1.7.9.5

Reviewed-by: Philip Rakity <prakity@...dia.com>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ