[SERVER-34275] Coverity analysis defect 103434: Dereference null return value Created: 03/Apr/18  Updated: 27/Oct/23  Resolved: 28/Jan/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Backlog - Replication Team
Resolution: Gone away Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Participants:

 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);


Generated at Thu Feb 08 04:36:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.