[SERVER-62899] Coverity analysis defect 121387: Dereference after null check Created: 23/Jan/22  Updated: 29/Oct/23  Resolved: 15/Feb/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-02-21
Participants:

 Description   

Dereference after null check

Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
/src/mongo/db/dbhelpers.cpp:167: FORWARD_NULL 121387 Comparing "desc" to null implies that "desc" might be null.



 Comments   
Comment by Githook User [ 15/Feb/22 ]

Author:

{'name': 'Haley Connelly', 'email': 'haley.connelly@mongodb.com', 'username': 'haleyConnelly'}

Message: SERVER-62899 Fix coverity defect in dbhelpers.cpp
Branch: master
https://github.com/mongodb/mongo/commit/39490b3f61d308a100776cedc61073e0dcb21e01

Generated at Thu Feb 08 05:56:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.