[SERVER-29324] Coverity analysis defect 101644: Dereference before null check Created: 23/May/17  Updated: 29/Jan/18  Resolved: 21/Nov/17

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Misha Tyulenev
Resolution: Duplicate Votes: 0
Labels: coverity, newgrad
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-30424 Coverity analysis defect 101903: Dere... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-10-02, Sharding 2017-12-04
Participants:

 Description   

All paths that lead to this null pointer comparison already dereference the pointer earlier

Defect 101644 (STATIC_C)
Checker REVERSE_INULL (subcategory none)
File: /src/mongo/db/db.cpp
Function shutdownTask()
/src/mongo/db/db.cpp, line: 1029
Null-checking "serviceContext" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

        if (serviceContext && serviceContext->getGlobalStorageEngine()) {



 Comments   
Comment by Eric Milkie [ 23/May/17 ]

The addition of the LogicalTime check triggered this Coverity defect.

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