[mapserver-commits] r9285 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Sep 1 06:35:46 EDT 2009
Author: tamas
Date: 2009-09-01 06:35:45 -0400 (Tue, 01 Sep 2009)
New Revision: 9285
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapobject.c
Log:
Fixed msFreeMap causing memory corruption in msFreeOutputFormat (#3113)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-09-01 10:12:05 UTC (rev 9284)
+++ trunk/mapserver/HISTORY.TXT 2009-09-01 10:35:45 UTC (rev 9285)
@@ -14,6 +14,8 @@
Current Version (SVN trunk):
----------------------------
+- Fixed msFreeMap causing memory corruption in msFreeOutputFormat (#3113)
+
- Fix WMC XML output when Dimension is used (#3110)
- Enable LOAD_WHOLE_IMAGE processing option by default when rendering
Modified: trunk/mapserver/mapobject.c
===================================================================
--- trunk/mapserver/mapobject.c 2009-09-01 10:12:05 UTC (rev 9284)
+++ trunk/mapserver/mapobject.c 2009-09-01 10:35:45 UTC (rev 9285)
@@ -124,11 +124,11 @@
msFree(map->templatepattern);
msFree(map->datapattern);
msFreeHashItems(&(map->configoptions));
- if( map->outputformat && --map->outputformat->refcount < 1 )
+ if( map->outputformat && map->outputformat->refcount > 0 && --map->outputformat->refcount < 1 )
msFreeOutputFormat( map->outputformat );
for(i=0; i < map->numoutputformats; i++ ) {
- if( --map->outputformatlist[i]->refcount < 1 )
+ if( map->outputformatlist[i]->refcount > 0 && --map->outputformatlist[i]->refcount < 1 )
msFreeOutputFormat( map->outputformatlist[i] );
}
if( map->outputformatlist != NULL )
More information about the mapserver-commits
mailing list