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

Coverity analysis defect 100050: Dereference null return value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0-rc4, 3.5.1
    • Component/s: MapReduce
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      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

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: