[SERVER-15629] GeoParser::parseMulti{Line|Polygon} does not clear objects owned by out parameter Created: 13/Oct/14 Updated: 11/Mar/15 Resolved: 16/Oct/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.6, 2.7.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | 28qa, address-sanitizer, leak-sanitizer, memory-leak | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Backport Completed: | |
| Participants: |
| Description |
|
The GeoParser::parseMultiLine and GeoParser::parseMultiPolygon functions take an out parameter of type MultiLineWithCRS (MultiPolygonWithCRS). This object contains an OwnedPointerVector of lines (polygons). The out parameter provided may point to an MultiLineWithCRS object that already has populated the OwnedPointerVector. An attempt is made to deal with this by invoking 'clear', however the 'clear' is applied to std::vector returned by OwnedPointerVector::mutableVector, rather than to OwnedPointerVector itself. As a result, the owned pointers are simply abandoned, rather than being freed by the OwnedPointerVector as intended. |
| Comments |
| Comment by Githook User [ 28/Nov/14 ] |
|
Author: {u'username': u'ramonfm', u'name': u'Ramon Fernandez', u'email': u'ramon.fernandez@mongodb.com'}Message: Manual backport of commit: |
| Comment by Githook User [ 16/Oct/14 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |