From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Wei Yongjun'" <weiyongjun1@huawei.com>
Cc: <linux-fsdevel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>,
"'Sungjong Seo'" <sj1557.seo@samsung.com>
Subject: RE: [PATCH -next] exfat: fix possible memory leak in exfat_find()
Date: Thu, 7 May 2020 11:50:17 +0900 [thread overview]
Message-ID: <004801d6241a$3d8da150$b8a8e3f0$@samsung.com> (raw)
In-Reply-To: <20200506142554.123748-1-weiyongjun1@huawei.com>
> 'es' is malloced from exfat_get_dentry_set() in exfat_find() and should be freed before leaving from
> the error handling cases, otherwise it will cause memory leak.
>
> Fixes: 5f2aa075070c ("exfat: add inode operations")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied.
Thanks!
> ---
> fs/exfat/namei.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index c241dd177f1a..48f4df883f3b 100644
> --- a/fs/exfat/namei.c
> +++ b/fs/exfat/namei.c
> @@ -681,6 +681,7 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
> exfat_fs_error(sb,
> "non-zero size file starts with zero cluster (size : %llu, p_dir : %u,
> entry : 0x%08x)",
> i_size_read(dir), ei->dir.dir, ei->entry);
> + kfree(es);
> return -EIO;
> }
>
>
prev parent reply other threads:[~2020-05-07 2:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200506142203epcas1p1f805af350b11786d9771fb5bd12bfdd6@epcas1p1.samsung.com>
2020-05-06 14:25 ` [PATCH -next] exfat: fix possible memory leak in exfat_find() Wei Yongjun
2020-05-07 2:50 ` Namjae Jeon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004801d6241a$3d8da150$b8a8e3f0$@samsung.com' \
--to=namjae.jeon@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=weiyongjun1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).