Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-8814

Replace null comparison with an assert to avoid implicit dereference of null pointer

    • 2
    • Storage - Ra 2022-03-07

      Dereference after null check

      Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
      /src/btree/bt_sync.c:227: FORWARD_NULL 121527 Comparing "ref->page" to null implies that "ref->page" might be null.
      /src/btree/bt_sync.c:284: FORWARD_NULL 121527 Dereferencing null pointer "ref->page".

            Assignee:
            sean.watt@mongodb.com Sean Watt
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: