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

Coverity analysis defect 103434: Dereference null return value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      Return value of function which returns null is dereferenced without checking

      Defect 103434 (STATIC_C)
      Checker NULL_RETURNS (subcategory none)
      File: /src/mongo/db/op_observer_impl.cpp
      Function mongo::OpObserverImpl::onTransactionPrepare(mongo::OperationContext *)
      /src/mongo/db/op_observer_impl.cpp, line: 873
      Assigning: "session" = null return value from "get".

              Session* const session = OperationContextSession::get(opCtx);

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: