[SERVER-6380] Close keyFile filedescriptor after reading the security key Created: 10/Jul/12  Updated: 11/Jul/16  Resolved: 31/Jul/12

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: None
Fix Version/s: 2.2.0-rc1

Type: Bug Priority: Minor - P4
Reporter: Jared Rosoff Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

https://github.com/mongodb/mongo/blob/master/src/mongo/db/security_common.cpp#L44

setUpSecurityKey reads the keyfile, but leaks the filedescriptor when the function ends. We should close the file after reading its value.



 Comments   
Comment by auto [ 31/Jul/12 ]

Author:

{u'date': u'2012-07-31T11:36:47-07:00', u'email': u'kristina@10gen.com', u'name': u'Kristina'}

Message: Merge pull request #274 from samantharitter/SERVER-6380

SERVER-6380 add fclose() to prevent resource leak
Branch: master
https://github.com/mongodb/mongo/commit/70c4ab23f30aff625335635ac2b4b666dedd61c1

Comment by auto [ 31/Jul/12 ]

Author:

{u'date': u'2012-07-31T11:36:47-07:00', u'email': u'kristina@10gen.com', u'name': u'Kristina'}

Message: Merge pull request #274 from samantharitter/SERVER-6380

SERVER-6380 add fclose() to prevent resource leak
Branch: master
https://github.com/mongodb/mongo/commit/70c4ab23f30aff625335635ac2b4b666dedd61c1

Comment by auto [ 31/Jul/12 ]

Author:

{u'date': u'2012-07-31T11:27:57-07:00', u'email': u'samantha.ritter@10gen.com', u'name': u'Samantha Ritter'}

Message: SERVER-6380 add fclose() to prevent resource leak
Branch: master
https://github.com/mongodb/mongo/commit/3b72b766bd152427a702f29ef8f12454c0e7613d

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