From: Tomasz Nowicki Date: Sat, 8 Jun 2013 01:00:07 +0000 (+0000) Subject: ACPICA: Fix possible memory leak in GPE init error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b739f106cb6385b83bac41e1f417c4e9347171a4;p=linux-beck.git ACPICA: Fix possible memory leak in GPE init error path Some GPE blocks were not deleted. ACPICA BZ 1018. Tomasz Nowicki References: https://bugs.acpica.org/show_bug.cgi?id=1018 Signed-off-by: Tomasz Nowicki Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Reviewed-by: Len Brown Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index a2d688bbac02..c1aa1eda26c3 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c @@ -382,6 +382,8 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, status = acpi_ev_install_gpe_block(gpe_block, interrupt_number); if (ACPI_FAILURE(status)) { + ACPI_FREE(gpe_block->register_info); + ACPI_FREE(gpe_block->event_info); ACPI_FREE(gpe_block); return_ACPI_STATUS(status); }