[PATCH 2/3] ACPICA: _OSI support: Fix possible memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jung-uk Kim <jkim@xxxxxxxxxxx>

Fixes a possible memory leak in the error exit path.
  From 388a9902074c3cfe57d2425d766c491d072d2948 Mon Sep 17 00:00:00 2001
  From: Jung-uk Kim <jkim@xxxxxxxxxxx>
  Date: Fri, 12 Apr 2013 00:24:34 +0000
  Subject: ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex()
Jung-uk Kim (jkim@xxxxxxxxxxx), Bob Moore.

Signed-off-by: Jung-uk Kim <jkim@xxxxxxxxxxx>
Signed-off-by: Bob Moore <robert.moore@xxxxxxxxx>
Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
---
 drivers/acpi/acpica/utosi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/utosi.c b/drivers/acpi/acpica/utosi.c
index b15aceb..7e80772 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)
 	return_value = 0;
 	status = acpi_os_acquire_mutex(acpi_gbl_osi_mutex, ACPI_WAIT_FOREVER);
 	if (ACPI_FAILURE(status)) {
-		return (status);
+		acpi_ut_remove_reference(return_desc);
+		return_ACPI_STATUS(status);
 	}
 
 	/* Lookup the interface in the global _OSI list */
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]