[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 |
| 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 |