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

Coverity analysis defect 116412: Dereference after null check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Catalog
    • Labels:
    • Operating System:
      ALL
    • Sprint:
      Execution Team 2020-11-02, Execution Team 2020-11-16, Execution Team 2020-11-30

      Description

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

        Attachments

          Activity

            People

            Assignee:
            gregory.noma Gregory Noma
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: