Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15629

GeoParser::parseMulti{Line|Polygon} does not clear objects owned by out parameter

    • Fully Compatible
    • ALL

      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.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: