Opened 13 years ago

Closed 13 years ago

#3756 closed defect (fixed)

SLD parsing leaks memory

Reported by: rouault Owned by: assefa
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description

Found when running msautotest/wxs with Valgrind

valgrind --leak-check=full mapserv "QUERY_STRING=map=wms_sld.map&SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-68.125,42,-58.375,48.5&FORMAT=image/png&WIDTH=300&HEIGHT=200&STYLES=&LAYERS=road&sld_body=%3CStyledLayerDescriptor+version%3D%221.0.0%22%3E%0D%0A%3CNamedLayer%3E%0D%0A%3CName%3Eroad%3C%2FName%3E%0D%0A%3CUserStyle%3E%0D%0A%3CTitle%3Exxx%3C%2FTitle%3E%0D%0A%3CFeatureTypeStyle%3E%0D%0A%3CRule%3E%0D%0A%3CLineSymbolizer%3E%0D%0A%3CGeometry%3E%0D%0A%3CPropertyName%3Ecenter-line%3C%2FPropertyName%3E%0D%0A%3C%2FGeometry%3E%0D%0A%3CStroke%3E%0D%0A%3CCssParameter+name%3D%22stroke%22%3E%230000ff%3C%2FCssParameter%3E%0D%0A%3C%2FStroke%3E%0D%0A%3C%2FLineSymbolizer%3E%0D%0A%3C%2FRule%3E%0D%0A%3C%2FFeatureTypeStyle%3E%0D%0A%3C%2FUserStyle%3E%0D%0A%3C%2FNamedLayer%3E%0D%0A%3C%2FStyledLayerDescriptor%3E%0D%0A"
==30308== 6,270 (896 direct, 5,374 indirect) bytes in 1 blocks are definitely lost in loss record 36 of 37
==30308==    at 0x4C27878: malloc (vg_replace_malloc.c:236)
==30308==    by 0x5C1196: msSLDParseSLD (mapogcsld.c:576)
==30308==    by 0x5BF6B5: msSLDApplySLD (mapogcsld.c:160)
==30308==    by 0x592EEF: msWMSLoadGetMapParams (mapwms.c:458)
==30308==    by 0x59F24C: msWMSDispatch (mapwms.c:4045)
==30308==    by 0x4D4529: msOWSDispatch (mapows.c:77)
==30308==    by 0x456964: main (mapserv.c:1249)

Change History (1)

comment:1 by assefa, 13 years ago

Resolution: fixed
Status: newclosed

Merci. committed in -r11337

Note: See TracTickets for help on using tickets.