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

Coverity analysis defect 105017: Dereference null return value

    XMLWordPrintable

    Details

    • Operating System:
      ALL
    • Sprint:
      Sharding 2018-10-22, Sharding 2018-11-05

      Description

      Return value of function which returns null is dereferenced without checking

      Defect 105017 (STATIC_C)
      Checker NULL_RETURNS (subcategory none)
      File: /src/mongo/db/s/txn_two_phase_commit_cmds.cpp
      Function mongo::<unnamed>::CoordinateCommitTransactionCmd::Invocation::typedRun(mongo::OperationContext *)
      /src/mongo/db/s/txn_two_phase_commit_cmds.cpp, line: 269
      Assigning: "txnParticipant" = null return value from "get".

                          auto txnParticipant = TransactionParticipant::get(opCtx);

      File: /src/mongo/db/s/txn_two_phase_commit_cmds.cpp
      Function mongo::<unnamed>::CoordinateCommitTransactionCmd::Invocation::typedRun(mongo::OperationContext *)
      /src/mongo/db/s/txn_two_phase_commit_cmds.cpp, line: 269
      Assigning: "txnParticipant" = null return value from "get".

                          auto txnParticipant = TransactionParticipant::get(opCtx);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matthew.saltz Matthew Saltz
              Reporter:
              xgen-internal-coverity Coverity Collector User
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: