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

Coverity analysis defect 100050: Dereference null return value

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.0-rc4, 3.5.1
    • MapReduce
    • Fully Compatible
    • ALL
    • Query 2016-11-21

    Description

      Return value of function which returns null is dereferenced without checking

      Defect 100050 (STATIC_C)
      Checker NULL_RETURNS (subcategory none)
      File: /src/mongo/db/commands/mr.cpp
      Function mongo::mr::<unnamed>::collectionCount(mongo::OperationContext *, const std::_cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &, bool)
      /src/mongo/db/commands/mr.cpp, line: 617
      Assigning: "db" = null return value from "get".

                  Database* db = dbHolder().get(txn, ns);

      Attachments

        Issue Links

          Activity

            People

              marko.vojvodic@mongodb.com Marko Vojvodic
              xgen-internal-coverity Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: