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

Coverity analysis defect 73708: Dereference null return value

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Quint 9 09/18/15

    Description

      Return value of function which returns null is dereferenced without checking

      Defect 73708 (STATIC_C)
      Checker NULL_RETURNS (subcategory none)
      File: /src/mongo/db/repair_database.cpp
      Function mongo::repairDatabase(mongo::OperationContext *, mongo::StorageEngine *, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool, bool)::[lambda() (instance 1)]::operator ()() const
      /src/mongo/db/repair_database.cpp, line: 227
      Assigning: "collection" = null return value from "getCollection".

                          auto collection = db->getCollection(collectionName);
      

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: