diff mbox

drivers/acpi/ec.c fix a small memory leak

Message ID 1265112730.4804.8.camel@ICE-BOX (mailing list archive)
State New, archived
Headers show

Commit Message

Darren Jenkins Feb. 2, 2010, 12:12 p.m. UTC
None
diff mbox

Patch

diff --git drivers/acpi/ec.c drivers/acpi/ec.c
index d6471bb..13061dc 100644
--- drivers/acpi/ec.c
+++ drivers/acpi/ec.c
@@ -1009,8 +1009,10 @@  int __init acpi_ec_ecdt_probe(void)
 	/* fall through */
 	}
 
-	if (EC_FLAGS_SKIP_DSDT_SCAN)
+	if (EC_FLAGS_SKIP_DSDT_SCAN) {
+		kfree(saved_ec);
 		return -ENODEV;
+	}
 
 	/* This workaround is needed only on some broken machines,
 	 * which require early EC, but fail to provide ECDT */