[mapserver-commits] r11075 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Mar 4 15:24:02 EST 2011


Author: rouault
Date: 2011-03-04 12:24:02 -0800 (Fri, 04 Mar 2011)
New Revision: 11075

Modified:
   trunk/mapserver/mapogcsld.c
Log:
fix memory leak

Modified: trunk/mapserver/mapogcsld.c
===================================================================
--- trunk/mapserver/mapogcsld.c	2011-03-04 20:11:56 UTC (rev 11074)
+++ trunk/mapserver/mapogcsld.c	2011-03-04 20:24:02 UTC (rev 11075)
@@ -830,6 +830,7 @@
                                     FLTPreParseFilterForAlias(psNode, psLayer->map, j, "G");
                                 }
 
+                                szExpression = FLTGetMapserverExpression(psNode, psLayer);
 
 /* ==================================================================== */
 /*      If the filter has a spatial filter or is a simple, we keep      */
@@ -842,8 +843,9 @@
 /* ==================================================================== */
                                 if (FLTHasSpatialFilter(psNode)) 
                                   psLayer->layerinfo = (void *)psNode;
-                                
-                                szExpression = FLTGetMapserverExpression(psNode, psLayer);
+                                else
+                                  FLTFreeFilterEncodingNode(psNode);
+                                psNode = NULL;
 
                                 if (szExpression)
                                 {



More information about the mapserver-commits mailing list