Opened 10 years ago
Closed 10 years ago
#2969 closed defect (fixed)
memory leak in the function of "lwtriangle_from_wkb_state"
Reported by: | cminus | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.1.6 |
Component: | liblwgeom | Version: | master |
Keywords: | memory leak | Cc: |
Description
We have detected a memory leak at line 517 of the file "liblwgeom\lwin_wkb.c", trunk version. The "lwtriangle_construct_empty" function had allocated a POINTERARRAY structure for tri→points member, but at line 555, that member was override by another POINTERARRAY variable 'pa', which caused a tiny memory leak.
Therefore before assigned variable 'pa' , tri→points should be freed firstly. e.g.
if (tri→points) {
ptarray_free(tri→points);
}
Change History (2)
comment:1 by , 10 years ago
Milestone: | PostGIS 2.1.5 → PostGIS 2.1.6 |
---|
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
trunk at r13353, 2.1 at r13354, 2.0 at r13355