Module Name: src
Committed By: christos
Date: Sat May 9 15:34:13 UTC 2015
Modified Files:
src/sys/external/bsd/acpica/dist/tables: tbinstal.c
Log Message:
CID 1292512: Help coverity with offset NULL calculations
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/tables/tbinstal.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/acpica/dist/tables/tbinstal.c
diff -u src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.4 src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.5
--- src/sys/external/bsd/acpica/dist/tables/tbinstal.c:1.4 Mon Apr 13 13:23:16 2015
+++ src/sys/external/bsd/acpica/dist/tables/tbinstal.c Sat May 9 11:34:13 2015
@@ -514,7 +514,11 @@ AcpiTbUninstallTable (
if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
{
- ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
+ void *ptr = ACPI_PHYSADDR_TO_PTR (TableDesc->Address);
+ if (ptr)
+ {
+ ACPI_FREE (ptr);
+ }
}
TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);