Skip to content

Commit

Permalink
GEOSLineMerge_r: Fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Algunenano committed Jan 15, 2020
1 parent 22532f5 commit 3e5f8c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capi/geos_ts_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ extern "C" {
LineMerger lmrgr;
lmrgr.add(g);

std::vector<LineString*>* lines = lmrgr.getMergedLineStrings();
std::unique_ptr<std::vector<LineString*>>lines (lmrgr.getMergedLineStrings());

auto out = gf->buildGeometry(lines->begin(), lines->end());
out->setSRID(g->getSRID());
Expand Down

0 comments on commit 3e5f8c5

Please sign in to comment.