Coverity analysis defect 101644: Dereference before null check

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Sharding 2017-10-02, Sharding 2017-12-04
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: