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

Coverity analysis defect 117786: Dereference after null check

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • ALL
    • Execution Team 2021-04-05

      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/create_collection.cpp:525: FORWARD_NULL 117786 Comparing "db" to null implies that "db" might be null.
      /src/mongo/db/catalog/create_collection.cpp:532: FORWARD_NULL 117786 Passing null pointer "db" to "makeUniqueCollectionNamespace", which dereferences it. (The dereference happens because this is a virtual function call.)

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: