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

Coverity analysis defect 101644: Dereference before null check

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • Fully Compatible
    • ALL
    • Sharding 2017-10-02, Sharding 2017-12-04

    Description

      All paths that lead to this null pointer comparison already dereference the pointer earlier

      Defect 101644 (STATIC_C)
      Checker REVERSE_INULL (subcategory none)
      File: /src/mongo/db/db.cpp
      Function shutdownTask()
      /src/mongo/db/db.cpp, line: 1029
      Null-checking "serviceContext" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

              if (serviceContext && serviceContext->getGlobalStorageEngine()) {

      Attachments

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: