From 041f94a8baba77aa39abb282f948d95e42507781 Mon Sep 17 00:00:00 2001 From: njl Date: Wed, 14 Jan 2004 18:54:22 +0000 Subject: When creating a package element via "Store(0xXXX, Index(ArgX, 0xXXX))", be sure to increment the refcount of the argument so it is not prematurely deleted. This is a workaround and may appear in a different form in ACPI-CA. This fixes battery evaluation on Thinkpads that was broken by fixing the Dell battery state. Submitted by: Luming Yu --- sys/contrib/dev/acpica/exstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/dev/acpica/exstore.c b/sys/contrib/dev/acpica/exstore.c index 91ecfd8..4f55117 100644 --- a/sys/contrib/dev/acpica/exstore.c +++ b/sys/contrib/dev/acpica/exstore.c @@ -389,7 +389,7 @@ AcpiExStoreObjectToIndex ( /* If same as the original source, add a reference */ - if (NewDesc == SourceDesc) + if (NewDesc == SourceDesc || ObjDesc == NULL) { AcpiUtAddReference (NewDesc); } -- cgit v1.1