[SERVER-38841] Coverity analysis defect 105216: Unchecked return value Created: 04/Jan/19  Updated: 29/Oct/23  Resolved: 17/Jan/19

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: A. Jesse Jiryu Davis
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: Repl 2019-01-28
Participants:

 Description   

Value returned from a function is not checked for errors before being used

Defect 105216 (STATIC_C)
Checker CHECKED_RETURN (subcategory none)
File: /src/mongo/scripting/mozjs/session.cpp
Function mongo::mozjs::<unnamed>::endSession(mongo::mozjs::SessionHolder *)
/src/mongo/scripting/mozjs/session.cpp, line: 130
Calling "runCommand" without checking return value (as is done elsewhere 23 out of 43 times).

            holder->client->runCommand("admin", abortObj, out);



 Comments   
Comment by Githook User [ 17/Jan/19 ]

Author:

{'username': 'ajdavis', 'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis'}

Message: SERVER-38841 Fix unchecked return value warning
Branch: master
https://github.com/mongodb/mongo/commit/fb5e65a32bf15cac2cb5f05145e369171d426152

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