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

Coverity analysis defect 134901: Dereference null return value

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • ALL
    • Execution Team 2023-04-17

      Dereference null return value

      If the function actually returns a null value, a null pointer dereference will occur. Return value of function which returns null is dereferenced without checking
      /src/mongo/db/catalog/collection_catalog.cpp:800: NULL_RETURNS 134901 Assigning: "latestCollection" = "nullptr" return value from "lookupCollectionByNamespaceForRead".
      /src/mongo/db/catalog/collection_catalog.cpp:804: NULL_RETURNS 134901 Attempting to access the managed object of an empty smart pointer "latestCollection".

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

              Created:
              Updated:
              Resolved: