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

Coverity analysis defect 104960: Dereference null return value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Write Ops
    • Labels:
    • Operating System:
      ALL

      Description

      Return value of function which returns null is dereferenced without checking

      Defect 104960 (STATIC_C)
      Checker NULL_RETURNS (subcategory none)
      File: /src/mongo/db/operation_context_session_mongod.cpp
      Function mongo::OperationContextSessionMongod::OperationContextSessionMongod(mongo::OperationContext *, bool, boost::optional<bool>, boost::optional<bool>)
      /src/mongo/db/operation_context_session_mongod.cpp, line: 48
      Assigning: "txnParticipant" = null return value from "get".

                  auto txnParticipant = TransactionParticipant::get(opCtx);

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: