[CDRIVER-755] Leaks in _mongoc_cluster_ismaster Created: 20/Jul/15 Updated: 05/Aug/15 Resolved: 22/Jul/15 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.1.9 |
| Fix Version/s: | 1.1.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As originally reported, a memory leak in this call stack:
Looking on the code https://github.com/mongodb/mongo-c-driver/blob/a0997439c86276f0dcdb49550636b11f3e407384/src/mongoc/mongoc-cluster.c#L1167 |
| Comments |
| Comment by Githook User [ 05/Aug/15 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge branch 'master' into 1.2.0-dev
Conflicts: |
| Comment by Githook User [ 05/Aug/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: mongoc_cluster_node_t.tags and replSet are overwritten with the new |
| Comment by Githook User [ 22/Jul/15 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: mongoc_cluster_node_t.tags and replSet are overwritten with the new |
| Comment by A. Jesse Jiryu Davis [ 20/Jul/15 ] |
|
Failing to destroy the "tags" bson only causes a leak if there are enough tags to cause the bson_t to spill its storage to heap. The replica set name is also overwritten without being freed, which is a leak under all circumstances. |
| Comment by A. Jesse Jiryu Davis [ 20/Jul/15 ] |
|
Related to |