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

Coverity analysis defect 105263: Dereference after null check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.7, 4.1.9
    • Component/s: Internal Code
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Sprint:
      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

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: