Re: [PATCH v2] fs/exfat: resolve memory leak from exfat_create_upcase_table()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 16, 2024 at 02:58:43PM -0700, Daniel Yang wrote:

> In exfat_create_upcase_table, ENOMEM and EINVAL result in a jump to
> exfat_load_default_upcase_table where memory is also allocated. Since
> ENOMEM doesn't allocate memory, freeing null addresses will result in a
> double free.

Freeing null address is a no-op.  Explicitly guaranteed, for the
same reason why C standard guarantees that free(NULL) is a no-op.
So you don't need to check if allocation had been done.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux