Opened 10 years ago

Closed 10 years ago

#2528 closed patch (fixed)

memory leaks in LwGeom

Reported by: esseffe Owned by: pramsey
Priority: high Milestone: PostGIS 2.0.5
Component: liblwgeom Version: 2.0.x
Keywords: Cc:

Description

Valgrind detects a couple of memory leaks caused by lwgeom_geos_split.c

the attached patch seems to resolve both issues

bye Sandro

Attachments (2)

split_mem_leak.patch (763 bytes ) - added by esseffe 10 years ago.
split_mem_leak.test (362 bytes ) - added by esseffe 10 years ago.

Download all attachments as: .zip

Change History (6)

by esseffe, 10 years ago

Attachment: split_mem_leak.patch added

comment:1 by strk, 10 years ago

Thank you Alessandro. Do you have a small input that triggers the leak for me to add in the testsuite ?

by esseffe, 10 years ago

Attachment: split_mem_leak.test added

comment:2 by esseffe, 10 years ago

Hi Strk, you'll find two very simple SQL statements on my second attachment (one for each mem-leak condition)

comment:3 by strk, 10 years ago

See how you like r12094 (in trunk), it's a slightly modified version of your patch avoiding a new allocation for the collection return case.

I think this could be backported to 2.1 and 2.0. Are we in time for 2.1.1 Paul ?

comment:4 by strk, 10 years ago

Milestone: PostGIS 2.1.1PostGIS 2.0.5
Resolution: fixed
Status: newclosed

Backported to 2.1 branch with r12096 (for 2.1.1) and 2.0 branch (2.0.5) with r12097

Note: See TracTickets for help on using tickets.