summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-01-14 18:54:22 +0000
committernjl <njl@FreeBSD.org>2004-01-14 18:54:22 +0000
commit041f94a8baba77aa39abb282f948d95e42507781 (patch)
tree36143932e21e56555002dfd10340ab79386f7c2e
parent0a33e354f93a05661e6afc4245e252b349caa8a2 (diff)
downloadFreeBSD-src-041f94a8baba77aa39abb282f948d95e42507781.zip
FreeBSD-src-041f94a8baba77aa39abb282f948d95e42507781.tar.gz
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 <luming.yu@intel.com>
-rw-r--r--sys/contrib/dev/acpica/exstore.c2
1 files changed, 1 insertions, 1 deletions
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);
}
OpenPOWER on IntegriCloud