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

Coverity analysis defect 101903: Dereference before null check

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL
    • 0

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

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

              if (opCtx) {
      

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: