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

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

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL

    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.

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow
            andrew.morrow@mongodb.com Andrew Morrow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: