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

Coverity analysis defect 101644: Dereference before null check

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL
    • Sharding 2017-10-02, Sharding 2017-12-04

      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()) {
      

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

              Created:
              Updated:
              Resolved: