From: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Darren Jenkins <darrenrjenkins@gmail.com>,
Kernel Janitors <kernel-janitors@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
linux ACPI <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/acpi/ec.c fix a small memory leak
Date: Wed, 03 Feb 2010 11:06:57 +0000 [thread overview]
Message-ID: <1265195217.2755.55.camel@localhost> (raw)
In-Reply-To: <4B684650.9070807@suse.de>
On Die, 2010-02-02 at 18:35 +0300, Alexey Starikovskiy wrote:
> NAK
>
> saved_ec is allocated if flag EC_FLAGS_VALIDATE_ECDT is true.
> EC_FLAGS_SKIP_DSDT_SCAN have no sense in such case, thus this new code path
> is never executed.
> On the other hand, unconditionally freeing pointer, which is might be NULL, is not
> right either.
Why that?
"kfree(NULL);" works (and in the user-space "free(NULL)" too FWIW).
> So, this patch introduced more problems as it tries to solve...
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at
WARNING: multiple messages have this Message-ID (diff)
From: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Darren Jenkins <darrenrjenkins@gmail.com>,
Kernel Janitors <kernel-janitors@vger.kernel.org>,
Len Brown <lenb@kernel.org>,
linux ACPI <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/acpi/ec.c fix a small memory leak
Date: Wed, 03 Feb 2010 12:06:57 +0100 [thread overview]
Message-ID: <1265195217.2755.55.camel@localhost> (raw)
In-Reply-To: <4B684650.9070807@suse.de>
On Die, 2010-02-02 at 18:35 +0300, Alexey Starikovskiy wrote:
> NAK
>
> saved_ec is allocated if flag EC_FLAGS_VALIDATE_ECDT is true.
> EC_FLAGS_SKIP_DSDT_SCAN have no sense in such case, thus this new code path
> is never executed.
> On the other hand, unconditionally freeing pointer, which is might be NULL, is not
> right either.
Why that?
"kfree(NULL);" works (and in the user-space "free(NULL)" too FWIW).
> So, this patch introduced more problems as it tries to solve...
Bernd
--
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at
LUGA : http://www.luga.at
next prev parent reply other threads:[~2010-02-03 11:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 12:12 [PATCH] drivers/acpi/ec.c fix a small memory leak Darren Jenkins
2010-02-02 12:12 ` Darren Jenkins
2010-02-02 15:35 ` Alexey Starikovskiy
2010-02-02 15:35 ` Alexey Starikovskiy
2010-02-03 6:12 ` Dan Carpenter
2010-02-03 6:12 ` Dan Carpenter
2010-02-03 6:12 ` Dan Carpenter
2010-02-03 11:06 ` Bernd Petrovitsch [this message]
2010-02-03 11:06 ` Bernd Petrovitsch
2010-02-03 11:33 ` Darren Jenkins
2010-02-03 11:33 ` Darren Jenkins
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=1265195217.2755.55.camel@localhost \
--to=bernd@petrovitsch.priv.at \
--cc=astarikovskiy@suse.de \
--cc=darrenrjenkins@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.