Opened 14 years ago
Closed 14 years ago
#3573 closed defect (fixed)
[PATCH] Fix memory leaks in mapwfs.c and mapwfs11.c
Reported by: | rouault | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | WFS Server | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | assefa |
Description
- Fixes 2 leaks in error code path
- Fix one leak in normal code path
(detected by valgrind)
Attachments (1)
Change History (6)
by , 14 years ago
Attachment: | fix_mapwfs_memleaks.patch added |
---|
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
Component: | MapServer C Library → WFS Server |
---|---|
Owner: | changed from | to
comment:3 by , 14 years ago
comment:4 by , 14 years ago
Yes, the fix in mapwfs11.c fixes a leak reported by valgrind at line 61 (psNsOws = xmlNewNs(NULL, BAD_CAST "http://www.opengis.net/ows", BAD_CAST "ows")). I had a hard time to come to that fix (I am not familiar with using libxml2) as it looks a bit strange, but it makes valgrind happy...
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have applied the patch r10615. It is effectively strange to me regarding valigrind complaining. Re-reading the docs seem to indicate and children elements should be freed. Thanks.
Note:
See TracTickets
for help on using tickets.
applying patch.. One thing though in -- mapwfs11.c, should we free the name space (+ xmlFreeNs(psNsOws). I believe that will be freed when the document is freed. Is there a leak on that that you have seen? Thanks