[RTEMS Project] #4331: main_pci.c: Dereference after null check error spotted by Coverity

RTEMS trac trac at rtems.org
Wed Mar 10 19:06:50 UTC 2021


#4331: main_pci.c: Dereference after null check error spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  lib        |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1399716: Dereference after null check in shell_pci_infodev().

 {{{
    10. var_compare_op: Comparing bus to null implies that bus might be
 null.
 358  if (!bus) {
    CID 1399716 (#1 of 1): Dereference after null check (FORWARD_NULL)11.
 var_deref_op: Dereferencing null pointer bus.
 359    printf(" AT BUS:        0x%x via Host Bridge\n", bus->num);
 360  } else {
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4331>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list