From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Muhammad Usama Anjum'" <musamaanjum@gmail.com>,
"'Sergey Senozhatsky'" <sergey.senozhatsky@gmail.com>,
"'Steve French'" <sfrench@samba.org>,
"'Hyunchul Lee'" <hyc.lee@gmail.com>,
"'open list:COMMON INTERNET FILE SYSTEM SERVER \(CIFSD\)'"
<linux-cifs@vger.kernel.org>,
"'open list:COMMON INTERNET FILE SYSTEM SERVER \(CIFSD\)'"
<linux-cifsd-devel@lists.sourceforge.net>,
"'open list'" <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, <colin.king@canonical.com>,
<dan.carpenter@oracle.com>
Subject: RE: [PATCH] cifsd: fix memory leak when loop ends
Date: Thu, 1 Apr 2021 17:17:13 +0900 [thread overview]
Message-ID: <003901d726cf$6b75d890$426189b0$@samsung.com> (raw)
In-Reply-To: <20210401075531.GA2766105@LEGION>
>
> Memory is being allocated and if veto_list is zero, the loop breaks without cleaning up the allocated
> memory. In this patch, the length check has been moved before allocation. If loop breaks, the memory
> isn't allocated in the first place. Thus the memory is being protected from leaking.
>
> Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
I will apply. Thanks for your patch!
prev parent reply other threads:[~2021-04-01 8:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210401075539epcas1p3b7cb52923217b212c80185aab135fe22@epcas1p3.samsung.com>
2021-04-01 7:55 ` [PATCH] cifsd: fix memory leak when loop ends Muhammad Usama Anjum
2021-04-01 8:17 ` 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='003901d726cf$6b75d890$426189b0$@samsung.com' \
--to=namjae.jeon@samsung.com \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=hyc.lee@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-cifsd-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=musamaanjum@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sfrench@samba.org \
/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