[mapserver-commits] r11335 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Mar 24 15:07:17 EDT 2011
Author: assefa
Date: 2011-03-24 12:07:17 -0700 (Thu, 24 Mar 2011)
New Revision: 11335
Modified:
trunk/mapserver/mapogcfilter.c
Log:
use of msSmallMalloc in few places #3770
Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c 2011-03-24 18:11:52 UTC (rev 11334)
+++ trunk/mapserver/mapogcfilter.c 2011-03-24 19:07:17 UTC (rev 11335)
@@ -1020,7 +1020,7 @@
psFilterNode->psRightNode->pszValue = pszSRS;
psFilterNode->psRightNode->pOther =
- (rectObj *)malloc(sizeof(rectObj));
+ (rectObj *)msSmallMalloc(sizeof(rectObj));
((rectObj *)psFilterNode->psRightNode->pOther)->minx = sBox.minx;
((rectObj *)psFilterNode->psRightNode->pOther)->miny = sBox.miny;
((rectObj *)psFilterNode->psRightNode->pOther)->maxx = sBox.maxx;
@@ -1067,7 +1067,7 @@
psDistance->psChild->psNext && psDistance->psChild->psNext->pszValue)
{
pszUnits = (char *)CPLGetXMLValue(psDistance, "units", NULL);
- psShape = (shapeObj *)malloc(sizeof(shapeObj));
+ psShape = (shapeObj *)msSmallMalloc(sizeof(shapeObj));
msInitShape(psShape);
if (FLTShapeFromGMLTree(psGMLElement, psShape, &pszSRS))
/* if (FLTGML2Shape_XMLNode(psPoint, psShape)) */
@@ -1145,7 +1145,7 @@
if (psGMLElement)
{
- psShape = (shapeObj *)malloc(sizeof(shapeObj));
+ psShape = (shapeObj *)msSmallMalloc(sizeof(shapeObj));
msInitShape(psShape);
if (FLTShapeFromGMLTree(psGMLElement, psShape, &pszSRS))
/* if (FLTGML2Shape_XMLNode(psPoint, psShape)) */
@@ -1874,7 +1874,7 @@
if (!psFilterNode || !psRect)
return NULL;
- if (strcasecmp(psFilterNode->pszValue, "BBOX") == 0)
+ if (psFilterNode->pszValue && strcasecmp(psFilterNode->pszValue, "BBOX") == 0)
{
if (psFilterNode->psRightNode && psFilterNode->psRightNode->pOther)
{
More information about the mapserver-commits
mailing list