Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/acpica/dist/tables CID 1292512: Help coveri...



details:   https://anonhg.NetBSD.org/src/rev/4a83f8d4d7fc
branches:  trunk
changeset: 338058:4a83f8d4d7fc
user:      christos <christos%NetBSD.org@localhost>
date:      Sat May 09 15:34:13 2015 +0000

description:
CID 1292512: Help coverity with offset NULL calculations

diffstat:

 sys/external/bsd/acpica/dist/tables/tbinstal.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r caee7148f3df -r 4a83f8d4d7fc sys/external/bsd/acpica/dist/tables/tbinstal.c
--- a/sys/external/bsd/acpica/dist/tables/tbinstal.c    Sat May 09 15:31:36 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbinstal.c    Sat May 09 15:34:13 2015 +0000
@@ -514,7 +514,11 @@
     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);



Home | Main Index | Thread Index | Old Index