[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1333155403.2939.0.camel@minggr>
Date: Sat, 31 Mar 2012 08:56:43 +0800
From: Lin Ming <ming.m.lin@...el.com>
To: Len Brown <lenb@...nel.org>
Cc: Bob Moore <robert.moore@...el.com>, Jesper Juhl <jj@...osbits.net>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI, psargs: Fix small mem leaks on error paths
We have ported this patch into ACPICA tree.
On Fri, 2012-03-30 at 03:11 -0400, Len Brown wrote:
> Bob?
>
> On 02/04/2012 08:12 PM, Jesper Juhl wrote:
>
> > As far as I can see, there are two small mem leaks in error paths of
> > 'acpi_ps_get_next_field()' where we neglect to free the memory
> > previously allocated to 'field'.
> >
> > I believe this patch should fix the leaks.
> >
> > Signed-off-by: Jesper Juhl <jj@...osbits.net>
> > ---
> > drivers/acpi/acpica/psargs.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > Note: Compile tested only.
> >
> > diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
> > index 5ac36ab..a683d66 100644
> > --- a/drivers/acpi/acpica/psargs.c
> > +++ b/drivers/acpi/acpica/psargs.c
> > @@ -618,6 +618,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
> >
> > arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP);
> > if (!arg) {
> > + acpi_ps_free_op(field);
> > return_PTR(NULL);
> > }
> >
> > @@ -662,6 +663,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
> > } else {
> > arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP);
> > if (!arg) {
> > + acpi_ps_free_op(field);
> > return_PTR(NULL);
> > }
> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists