Opened 14 years ago

Closed 14 years ago

#624 closed defect (fixed)

Memory leak in geography_from_text

Reported by: ryang Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.3
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

char *wkt is palloc'ed and never free'd.

Was crashing Postgres every run of my script. Made a simple change to:

char wkt[size+1];

And problem has gone away. Couldn't track down the DirectFunctionCall3 to store the value and free wkt, so just did the quick hack without a pointer.

I found the problem in 2.0, but it must exist simarily in 1.5.2 as I've been battling it all evening, and only tried 2.0 out of desperation.

Change History (1)

comment:1 by pramsey, 14 years ago

Resolution: fixed
Status: newclosed

Patched in 1.5 at r6375 and in trunk at r6376. Thanks for the pointer! (ha ha)

Note: See TracTickets for help on using tickets.