[haiku-commits] Re: haiku: hrev46797 - src/add-ons/kernel/file_systems/ntfs

  • From: Urias McCullough <umccullough@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 31 Jan 2014 08:00:10 -0800

On Fri, Jan 31, 2014 at 2:58 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
>> On January 31, 2014 at 11:35 AM Gerasim Troeglazov <3deyes@xxxxxxxxx> wrote:
>> @@ -1481,6 +1480,8 @@ exit:
>>               ntfs_attr_close(na);
>>       if (ni != NULL)
>>               ntfs_inode_close(ni);
>> +     if (tempBuffer != NULL)
>> +             free(tempBuffer);
>
> free() in Haiku is documented to accept NULL pointers, so checks like the 
> above
> can (and, according to our coding style guidelines, should) be omitted.

Which brings up a different question - shouldn't we also upstream this fix?

- Urias

Other related posts: