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

Coverity analysis defect 100050: Dereference null return value

    • Fully Compatible
    • ALL
    • Query 2016-11-21

      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);
      

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

              Created:
              Updated:
              Resolved: