Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71804

Coverity analysis defect 134265: Dereference after null check

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2022-12-26

      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/mongo/db/catalog/collection_catalog.cpp:788: FORWARD_NULL 134265 Calling "pendingCollection->operator bool()" implies that "pendingCollection" might be null-like.
      /src/mongo/db/catalog/collection_catalog.cpp:805: FORWARD_NULL 134265 Attempting to access the managed object of an empty smart pointer "pendingCollection".

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: