diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2017-07-28 22:23:29 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2017-07-28 22:23:29 +0000 |
commit | 5f9b24fa4327c851ddb733b73904401afe3f0123 (patch) | |
tree | f4879977fd0a6421e6cfe367411f8d1a3049824c /sys/contrib/dev/acpica/components/disassembler/dmopcode.c | |
parent | 07451638fadaa5c9237e958b5da90169e992fbb2 (diff) | |
parent | 834d4c5613e9c57c0b9fba46fa717fd7fb9d5891 (diff) |
Notes
Diffstat (limited to 'sys/contrib/dev/acpica/components/disassembler/dmopcode.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/disassembler/dmopcode.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c index e7f75647b0cd..3cec7e88ed0a 100644 --- a/sys/contrib/dev/acpica/components/disassembler/dmopcode.c +++ b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c @@ -528,25 +528,30 @@ AcpiDmFieldPredefinedDescription ( /* Major cheat: We previously put the Tag ptr in the Node field */ Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node); - if (!Tag) + if (!Tag || (*Tag == 0)) { return; } - /* Match the name in the info table */ + /* Is the tag a predefined name? */ Info = AcpiAhMatchPredefinedName (Tag); - if (Info) + if (!Info) { - AcpiOsPrintf (" // %4.4s: %s", Tag, - ACPI_CAST_PTR (char, Info->Description)); + /* Not a predefined name (does not start with underscore) */ + + return; } - /* AML buffer (String) was allocated in AcpiGetTagPathname */ + AcpiOsPrintf (" // %4.4s: %s", Tag, + ACPI_CAST_PTR (char, Info->Description)); - ACPI_FREE (IndexOp->Common.Value.String); + /* String contains the prefix path, free it */ + ACPI_FREE (IndexOp->Common.Value.String); + IndexOp->Common.Value.String = NULL; #endif + return; } |