[SERVER-2520] add comments in code about intentional memory leak in ReplSetImpl::initFromConfig() Created: 10/Feb/11  Updated: 12/Jul/16  Resolved: 02/May/11

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

Type: Bug Priority: Minor - P4
Reporter: Aaron Staple Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

A "new Member" allocated in this function may be leaked according to valgrind. Quick look through the code suggests that this function can be called multiple times (in one particular case if we are reconfiguring a repl set) and don't see immediately that they are cleaned up.

It looks like the members in _members and _self can be leaked.

It also appears that the _members values are leaked intentionally.



 Comments   
Comment by auto [ 02/May/11 ]

Author:

{u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

Message: add comment about memory leaks SERVER-2520
Branch: master
https://github.com/mongodb/mongo/commit/210d9599c32c0819ae7a7715e146c2c27f603623

Comment by Dwight Merriman [ 15/Feb/11 ]

i think was intentional, as it's a concurrency thing that there could be latent readers of it.

Comment by Aaron Staple [ 15/Feb/11 ]

There is another leak in this function I didn't address earlier - the _cfg variable is leaked. Not sure if that one's intentional or not. Might be nice to comment when there are intentional leaks.

Comment by Dwight Merriman [ 10/Feb/11 ]

was intentional

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