From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: miaoguanqin <miaoguanqin@huawei.com>
Cc: <jes@trained-monkey.org>, <pmenzel@molgen.mpg.de>,
<linux-raid@vger.kernel.org>, <linfeilong@huawei.com>,
<lixiaokeng@huawei.com>, <louhongxiang@huawei.com>
Subject: Re: [PATCH 2/4] Fix memory leak in file Kill
Date: Tue, 28 Mar 2023 11:38:39 +0200 [thread overview]
Message-ID: <20230328113839.000078e3@linux.intel.com> (raw)
In-Reply-To: <20230323013053.3238005-3-miaoguanqin@huawei.com>
Hi,
see comments below.
On Thu, 23 Mar 2023 09:30:51 +0800
miaoguanqin <miaoguanqin@huawei.com> wrote:
> When we test mdadm with asan,we found some memory leaks in Kill.c
missing space after ","
> We fix these memory leaks based on code logic.
>
> Signed-off-by: miaoguanqin <miaoguanqin@huawei.com>
> Signed-off-by: lixiaokeng <lixiaokeng@huawei.com>
> ---
> Kill.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Kill.c b/Kill.c
> index bfd0efdc..46a1a8a0 100644
> --- a/Kill.c
> +++ b/Kill.c
> @@ -41,6 +41,7 @@ int Kill(char *dev, struct supertype *st, int force, int
> verbose, int noexcl)
> * 4 - failed to find a superblock.
> */
>
> + int flags = 0;
could you name it "free_super" or something like that? could you use bool?
Thanks,
Mariusz
next prev parent reply other threads:[~2023-03-28 9:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 1:30 [PATCH 0/4] Fix memory leak for Manage Assemble Kill mdadm miaoguanqin
2023-03-23 1:30 ` [PATCH 1/4] Fix memory leak in file Assemble miaoguanqin
2023-03-28 7:54 ` Mariusz Tkaczyk
2023-03-28 11:21 ` Paul Menzel
2023-03-23 1:30 ` [PATCH 2/4] Fix memory leak in file Kill miaoguanqin
2023-03-28 9:38 ` Mariusz Tkaczyk [this message]
2023-03-23 1:30 ` [PATCH 3/4] Fix memory leak in file Manage miaoguanqin
2023-03-28 10:28 ` Mariusz Tkaczyk
2023-03-23 1:30 ` [PATCH 4/4] Fix memory leak in file mdadm miaoguanqin
2023-03-28 10:29 ` Mariusz Tkaczyk
-- strict thread matches above, loose matches on Subject: below --
2023-04-06 11:40 [PATCH 0/4] Fix memory leak for Manage Assemble Kill mdadm Guanqin Miao
2023-04-06 11:40 ` [PATCH 2/4] Fix memory leak in file Kill Guanqin Miao
2023-04-24 8:06 [PATCH 0/4] Fix memory leak for Manage Assemble Kill mdadm Guanqin Miao
2023-04-24 8:06 ` [PATCH 2/4] Fix memory leak in file Kill Guanqin Miao
2023-08-23 13:49 ` Mariusz Tkaczyk
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=20230328113839.000078e3@linux.intel.com \
--to=mariusz.tkaczyk@linux.intel.com \
--cc=jes@trained-monkey.org \
--cc=linfeilong@huawei.com \
--cc=linux-raid@vger.kernel.org \
--cc=lixiaokeng@huawei.com \
--cc=louhongxiang@huawei.com \
--cc=miaoguanqin@huawei.com \
--cc=pmenzel@molgen.mpg.de \
/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).