aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-01-16 14:37:52 -0500
committerLen Brown <len.brown@intel.com>2011-01-18 23:47:30 -0500
commitbe33b76a974cdb4ceadc1a12fb79cc97bcfeea37 (patch)
treef43581f9dbd184c8c7c80d54840d1e17d43257b3 /drivers/acpi/acpica
parent1ae5ec903f71c0ffa583ec54d17415892036ee18 (diff)
ACPICA: Fix memory leak in acpi_ev_asynch_execute_gpe_method().
We will leak the memory allocated to 'local_gpe_event_info' if 'acpi_ut_acquire_mutex()' fails or if 'acpi_ev_valid_gpe_event()' fails in drivers/acpi/acpica/evgpe.c::acpi_ev_asynch_execute_gpe_method(). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Reviewed-by: Rafael Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/evgpe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 7c339d34ab42..b6de1fb34f44 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -471,6 +471,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
471 471
472 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); 472 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
473 if (ACPI_FAILURE(status)) { 473 if (ACPI_FAILURE(status)) {
474 ACPI_FREE(local_gpe_event_info);
474 return_VOID; 475 return_VOID;
475 } 476 }
476 477
@@ -478,6 +479,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
478 479
479 if (!acpi_ev_valid_gpe_event(gpe_event_info)) { 480 if (!acpi_ev_valid_gpe_event(gpe_event_info)) {
480 status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); 481 status = acpi_ut_release_mutex(ACPI_MTX_EVENTS);
482 ACPI_FREE(local_gpe_event_info);
481 return_VOID; 483 return_VOID;
482 } 484 }
483 485