Re: [PATCH] fuse: Fix a potential memory leak for kstrdup()

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

 



On Fri, 15 Jul 2022 at 09:54, <williamsukatube@xxxxxxx> wrote:
>
> From: William Dean <williamsukatube@xxxxxxxxx>
>
> kfree() is missing on an error path to free the memory allocated by
> kstrdup():
>
>   sb->s_subtype = kstrdup(parent_sb->s_subtype, GFP_KERNEL);
>
> So it is better to free it via kfree(sb->s_subtype).

Not needed.  s_subtype will be freed in __put_super().

Thanks,
Miklos



[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