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

Coverity analysis defect 105263: Dereference after null check

    • Fully Compatible
    • ALL
    • v4.0
    • Service Arch 2019-03-11

      Pointer is checked against null but then dereferenced anyway

      Defect 105263 (STATIC_C)
      Checker FORWARD_NULL (subcategory none)
      File: /src/mongo/db/service_context.cpp
      Function mongo::ServiceContext::OperationContextDeleter::operator ()(mongo::OperationContext *) const
      /src/mongo/db/service_context.cpp, line: 261
      Comparing "client" to null implies that "client" might be null.

              if (client && client->session()) {
      

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: