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: <5038e4c1-440b-0a56-978b-a8c9fac061cc@axis.com>
Date:   Fri, 24 Apr 2020 13:22:14 +0200
From:   Bjorn Ardo <bjorn.ardo@...s.com>
To:     Wolfram Sang <wsa@...-dreams.de>
CC:     <linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <patrick@...cx.xyz>, <kernel@...s.com>
Subject: Re: [PATCHv2] i2c: slave-eeprom: Make it possible to pre-load eeprom
 data

On 4/24/20 1:13 PM, Wolfram Sang wrote:

> On second look, two questions:
>
>> +	if (!error) {
>> +		int ret = request_firmware_into_buf(&fw, eeprom_data, &client->dev,
>> +						    eeprom->buffer, size);
>> +		if (ret)
>> +			return ret;
> Aren't we leaking 'fw' here?


As I can see in drivers/base/firmware_loader/main.c in function 
_request_firmware, then the fw will be released internally if it returns 
an error value.


> Also, do we need 'error' and 'ret'? Can't we reuse one of them?


Yes, I can fix that.


/BA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ