[mapserver-commits] r11037 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Mar 2 08:39:25 EST 2011


Author: sdlime
Date: 2011-03-02 05:39:25 -0800 (Wed, 02 Mar 2011)
New Revision: 11037

Modified:
   trunk/mapserver/maplayer.c
Log:
Made msLayerClose() expression freeing less vigorous. (#3692)

Modified: trunk/mapserver/maplayer.c
===================================================================
--- trunk/mapserver/maplayer.c	2011-03-01 14:46:02 UTC (rev 11036)
+++ trunk/mapserver/maplayer.c	2011-03-02 13:39:25 UTC (rev 11037)
@@ -200,7 +200,7 @@
 */
 void msLayerClose(layerObj *layer) 
 {
-  int i;
+  int i,j;
 
   /* no need for items once the layer is closed */
   msLayerFreeItemInfo(layer);
@@ -211,9 +211,12 @@
   }
 
   /* clear out items used as part of expressions (bug #2702) -- what about the layer filter? */
+  freeExpressionTokens(&(layer->filter));
   for(i=0; i<layer->numclasses; i++) {    
-    freeExpression(&(layer->class[i]->expression));
-    freeExpression(&(layer->class[i]->text));
+    freeExpressionTokens(&(layer->class[i]->expression));
+    freeExpressionTokens(&(layer->class[i]->text));
+    for(j=0; j<layer->class[i]->numstyles; j++)
+      freeExpressionTokens(&(layer->class[i]->styles[j]->_geomtransform));
   }
 
   if (layer->vtable) {



More information about the mapserver-commits mailing list