From: NeilBrown <neilb@suse.de>
To: Lukasz Dorau <lukasz.dorau@intel.com>
Cc: linux-raid@vger.kernel.org, pawel.baldysiak@intel.com
Subject: Re: [PATCH] Manage.c: fix small memory leak
Date: Tue, 10 Sep 2013 09:33:28 +1000 [thread overview]
Message-ID: <20130910093328.76ba5449@notabene.brown> (raw)
In-Reply-To: <20130905091634.4986.72835.stgit@gklab-154-244.igk.intel.com>
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
On Thu, 05 Sep 2013 11:16:34 +0200 Lukasz Dorau <lukasz.dorau@intel.com>
wrote:
> 'avail' is dynamically allocated, so it should be freed.
>
> Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
> ---
> Manage.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Manage.c b/Manage.c
> index afa9b42..910caa6 100644
> --- a/Manage.c
> +++ b/Manage.c
> @@ -853,6 +853,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
> }
> array_failed = !enough(array->level, array->raid_disks,
> array->layout, 1, avail);
> + free(avail);
> } else
> array_failed = 0;
> if (array_failed) {
Applied. Thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2013-09-09 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-05 9:16 [PATCH] Manage.c: fix small memory leak Lukasz Dorau
2013-09-09 23:33 ` NeilBrown [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=20130910093328.76ba5449@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=lukasz.dorau@intel.com \
--cc=pawel.baldysiak@intel.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).