Opened 17 years ago
Last modified 15 years ago
#2168 new defect
Leak of classes in mapogcsld.c and mapogcfilter.c
Reported by: | dmorissette | Owned by: | dmorissette |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | MapServer C Library | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: | assefa |
Description
Assefa, while working on ticket #302, I noticed a few places in mapogcsld.c and mapogcfilter.c that seem to be leaking the contents of existing classes in the layers on which sld/filters are applied.
The places that I spotted are marked by a TODO comment in r6360.
Can you please review those comments and confirm that getting rid of existing classes if really the intended behavior. If yes then I will implement a function to clear all classes in a clean way since just calling initClass() on an existing class doesn't free existing members and ends up leaking memory.
Change History (5)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Milestone: | 5.0 release → 5.0.1 release |
---|
comment:3 by , 16 years ago
Milestone: | 5.0.1 release → 5.2 release |
---|
comment:4 by , 16 years ago
Milestone: | 5.2 release → 5.4 release |
---|
comment:5 by , 15 years ago
Milestone: | 5.4 release → 6.0 release |
---|
I have checked the spots and that intenstion freeing exsiting classes should be done.
The only one that kind of bothered me was the todo around line 225 in mapogcfilter.c : the final result should give 2 valid classes set (and numclasses should be equal to 2). It should not happen where at this point we have more that 1 class.