[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJfpegs4jRd=FrgDaLxcnbCKWCU=PrsdEzat58j0xB2XdTatZg@mail.gmail.com>
Date: Fri, 15 Jul 2022 16:06:52 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: williamsukatube@....com
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
William Dean <williamsukatube@...il.com>,
Hacash Robot <hacashRobot@...tino.com>
Subject: Re: [PATCH] fuse: Fix a potential memory leak for kstrdup()
On Fri, 15 Jul 2022 at 09:54, <williamsukatube@....com> wrote:
>
> From: William Dean <williamsukatube@...il.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
Powered by blists - more mailing lists