[SERVER-11544] Coverity analysis defect 14909 Created: 04/Nov/13  Updated: 11/Jul/16  Resolved: 04/Nov/13

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: auto Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

A new defect has been detected and assigned to sverch in Coverity Connect http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=14909
The defect was flagged by checker RESOURCE_LEAK in
file /src/mongo/util/options_parser/options_parser.cpp
function mongo::optionenvironment::OptionsParser::readConfigFile(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
and this ticket was created by matt.kangas@10gen.com



 Comments   
Comment by auto [ 04/Nov/13 ]

Author:

{u'username': u'Zarkantho', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}

Message: SERVER-11544 Make sure to fclose config file on error
Branch: master
https://github.com/mongodb/mongo/commit/241715adf1185955466e44eb111e61bb8f92324e

Comment by Eric Milkie [ 04/Nov/13 ]

We should use ON_BLOCK_EXIT(fclose, config) at l.611

Generated at Thu Feb 08 03:26:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.