Mapserver Memory Leak #2

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Jun 7 23:31:00 EDT 2007


Using msyylex_destroy would be preferable over the homegrown cleanup function
in maplexer.l. I can do this, will you file a ticket?

Steve

>>> Stephen Woodbridge <woodbri at SWOODBRIDGE.COM> 06/07/07 7:48 PM >>>
Hi,

It looks like the maplexer.c might be leaking memory.

maplexer.c:4318 (current svn) allocates yy_buffer_stack and this is 
getting leaked.

It should probably get freed in lexer_cleanup() with something like:

if( (yy_buffer_stack) != NULL )
{
     msyyfree( (yy_buffer_stack) );
     (yy_buffer_stack) = NULL;
}

or by calling

msyylex_destroy();

or by something similar. I am not familiar with this code so someone 
that knows it should probably look into this and verify that my 
assumptions are correct.

Thanks,
   -Steve W



More information about the mapserver-dev mailing list