diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-05-08 00:01:49 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-05-08 09:31:46 -0400 |
commit | 3aa2eeacb559e9901153d3b084ade81515b0967e (patch) | |
tree | 27695ba57132862df9da81e0760fc08b80b9a97e /drivers/acpi | |
parent | 61388f9e5d93053cf399a356414f31f9b4814c6d (diff) |
ACPICA: _OSI support: Fix possible memory leak
Fixes a possible memory leak in the error exit path introduced by
recent commit 388a990 ("ACPICA: _OSI Support: handle any errors from
acpi_os_acquire_mutex()").
[rjw: Changelog]
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/utosi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c index b15acebb96a1..7e807725c636 100644 --- a/drivers/acpi/acpica/utosi.c +++ b/drivers/acpi/acpica/utosi.c | |||
@@ -349,7 +349,8 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state * walk_state) | |||
349 | return_value = 0; | 349 | return_value = 0; |
350 | status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER); | 350 | status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER); |
351 | if (ACPI_FAILURE(status)) { | 351 | if (ACPI_FAILURE(status)) { |
352 | return (status); | 352 | acpi_ut_remove_reference(return_desc); |
353 | return_ACPI_STATUS(status); | ||
353 | } | 354 | } |
354 | 355 | ||
355 | /* Lookup the interface in the global _OSI list */ | 356 | /* Lookup the interface in the global _OSI list */ |