Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#758 closed defect (fixed)

Memory leaks in msWFSDispatch()

Reported by: dmorissette Owned by: mapserverbugs
Priority: high Milestone: 4.4 release
Component: WFS Server Version: 4.3
Severity: normal Keywords: VERIFIED
Cc:

Description

It seems that msWFSDispatch() is systematically leaking its wfsParamsObj. Worse:
this happens even for non-WFS requests.

Here is the Valgring excerpt on a regular CGI request (non-WFS request) using
today's mapserv 4.3 CVS:

==5603== 32 bytes in 1 blocks are definitely lost in loss record 4 of 11
==5603==    at 0x401617F2: calloc (vg_clientfuncs.c:245)
==5603==    by 0x8091666: msWFSCreateParamsObj (mapwfs.c:1278)
==5603==    by 0x80913F1: msWFSDispatch (mapwfs.c:1179)
==5603==    by 0x808EC16: msOWSDispatch (mapows.c:156)
==5603==    by 0x804FC00: main (mapserv.c:946)
==5603==    by 0x4090AAB6: __libc_start_main (in /lib/libc-2.3.2.so)
==5603==    by 0x804D218: ??? (start.S:81)
==5603==

The whole msWFSDispatch() function needs to be reviewed to properly cleanup at
all its return points (there are 12 return points).

Change History (4)

comment:1 by dmorissette, 20 years ago

Milestone: 4.4 release

comment:2 by assefa, 20 years ago

Looking into it.

comment:3 by assefa, 20 years ago

Resolution: fixed
Status: newclosed
Memory leak fixed and tested using Purify.

comment:4 by dmorissette, 20 years ago

Keywords: VERIFIED added
Verified with Valgrind (at least with the test case that I had).
Note: See TracTickets for help on using tickets.