[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: SERVER-15629 Clear owned lines/polys correctly

Manual backport of commit:
27147aaf26aef235f8a65223e876adeea016886a
Branch: v2.6
https://github.com/mongodb/mongo/commit/175d6ecb8bef59745a73fc7769c8a281aa70c7ad

Comment by Githook User [ 16/Oct/14 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-15629 Clear owned lines/polys correctly
Branch: master
https://github.com/mongodb/mongo/commit/27147aaf26aef235f8a65223e876adeea016886a

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