Opened 5 years ago

Closed 5 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 5 years ago.
split_mem_leak.test (362 bytes) - added by esseffe 5 years ago.

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by esseffe

Attachment: split_mem_leak.patch added

comment:1 Changed 5 years ago by strk

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

Changed 5 years ago by esseffe

Attachment: split_mem_leak.test added

comment:2 Changed 5 years ago by esseffe

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

comment:3 Changed 5 years ago by strk

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 Changed 5 years ago by strk

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.