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]
Date: Wed, 27 Dec 2023 18:28:26 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 linux-mmc@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
 Dmitry Torokhov <dmitry.torokhov@...il.com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Paolo Abeni <pabeni@...hat.com>, Ulf Hansson <ulf.hansson@...aro.org>,
 Yang Yingliang <yangyingliang@...wei.com>,
 LKML <linux-kernel@...r.kernel.org>, cocci@...ia.fr
Subject: Re: mmc: mmc_spi: Adjust error handling in mmc_spi_probe()

>> The kfree() function was called in one case by
>> the mmc_spi_probe() function during error handling
>> even if the passed variable contained a null pointer.
>> This issue was detected by using the Coccinelle software.
>
>> * Thus return directly after a call of the function “kmalloc” failed
>>   at the beginning.
>>
>> * Move an error code assignment into an if branch.
>
> How is this one better?

I suggest to avoid a bit of redundant data processing also at this source code place.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ