lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070718175126.40d845c5.akpm@linux-foundation.org>
Date:	Wed, 18 Jul 2007 17:51:26 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jesper Juhl <jesper.juhl@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	robert.moore@...el.com, len.brown@...el.com
Subject: Re: [PATCH][ACPI] Fix acpi_ev_pci_config_region_setup() to avoid
 memory leak

On Thu, 19 Jul 2007 00:48:03 +0200
Jesper Juhl <jesper.juhl@...il.com> wrote:

> Hello,
> 
> In drivers/acpi/events/evrgnini.c::acpi_ev_pci_config_region_setup() 
> there is a memory leak.
> We may return at "if (!pci_device_node)" without freeing storage 
> previously allocated and assigned to 'pci_id'.
> This patch fixes the leak by freeing the allocated storage in this 
> case.
> 
> Compile tested only...
> 
> 
> Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
> ---
> 
>  drivers/acpi/events/evrgnini.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
> index 400d90f..10f378b 100644
> --- a/drivers/acpi/events/evrgnini.c
> +++ b/drivers/acpi/events/evrgnini.c
> @@ -284,6 +284,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
>  	}
>  
>  	if (!pci_device_node) {
> +		kfree(pci_id);
>  		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
>  	}
>  

We're supposed to use the attractive ACPI_FREE() here.  I'll make that
change.

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ