Messages in this thread | | | From | Miklos Szeredi <> | Date | Fri, 15 Jul 2022 16:06:52 +0200 | Subject | Re: [PATCH] fuse: Fix a potential memory leak for kstrdup() |
| |
On Fri, 15 Jul 2022 at 09:54, <williamsukatube@163.com> wrote: > > From: William Dean <williamsukatube@gmail.com> > > 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
| |