[mapserver-commits] r10680 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Oct 28 17:30:06 EDT 2010


Author: rouault
Date: 2010-10-28 14:30:06 -0700 (Thu, 28 Oct 2010)
New Revision: 10680

Modified:
   trunk/mapserver/mapgml.c
Log:
Fix memory leak in msGML3Point()

Modified: trunk/mapserver/mapgml.c
===================================================================
--- trunk/mapserver/mapgml.c	2010-10-28 18:55:35 UTC (rev 10679)
+++ trunk/mapserver/mapgml.c	2010-10-28 21:30:06 UTC (rev 10680)
@@ -1597,6 +1597,7 @@
   char *pszTmp = NULL;
   int dimension = 2;
   char *pszSrsName = NULL;
+  char *pszTmp2 = NULL;
   size_t bufferSize = 0;
 
   psNode = xmlNewNode(psNs, BAD_CAST "Point");
@@ -1622,10 +1623,12 @@
 
   pszTmp = msDoubleToString(x, MS_TRUE);
   pszTmp = msStringConcatenate(pszTmp, " ");
-  pszTmp = msStringConcatenate(pszTmp, msDoubleToString(y, MS_TRUE));
+  pszTmp2 = msDoubleToString(y, MS_TRUE);
+  pszTmp = msStringConcatenate(pszTmp, pszTmp2);
   psSubNode = xmlNewChild(psNode, NULL, BAD_CAST "pos", BAD_CAST pszTmp);
 
   free(pszTmp);
+  free(pszTmp2);
   return psNode;
 }
 



More information about the mapserver-commits mailing list