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

Coverity analysis defect 105263: Dereference after null check

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.7, 4.1.9
    • Internal Code
    • Fully Compatible
    • ALL
    • v4.0
    • Service Arch 2019-03-11

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: