[mapserver-commits] r8447 - in trunk/mapserver: . mapscript/php3
svn at osgeo.org
svn at osgeo.org
Wed Jan 21 13:47:35 EST 2009
Author: aboudreault
Date: 2009-01-21 13:47:35 -0500 (Wed, 21 Jan 2009)
New Revision: 8447
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapscript/php3/php_mapscript.c
Log:
Fixed memory leak of map::setProjection in PHP/MapScript (#2861)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-01-21 17:29:23 UTC (rev 8446)
+++ trunk/mapserver/HISTORY.TXT 2009-01-21 18:47:35 UTC (rev 8447)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Fixed memory leak of map::setProjection in PHP/MapScript (#2861)
+
- Fixed "internal PHP GC memory leaks" in PHP/MapScript (#2767)
- Fixed bug with wms layer group hierarchy (#2810)
Modified: trunk/mapserver/mapscript/php3/php_mapscript.c
===================================================================
--- trunk/mapserver/mapscript/php3/php_mapscript.c 2009-01-21 17:29:23 UTC (rev 8446)
+++ trunk/mapserver/mapscript/php3/php_mapscript.c 2009-01-21 18:47:35 UTC (rev 8447)
@@ -2095,8 +2095,6 @@
bSetUnitsAndExtents = pSetUnitsAndExtents->value.lval;
}
-
- msInitProjection(&in);
in = self->projection;
msInitProjection(&out);
if (bWKTProj)
@@ -2104,7 +2102,7 @@
else
msLoadProjectionString(&(out), pProjString->value.str.val);
sRect = self->extent;
-
+
if (in.proj!= NULL && out.proj!=NULL)
{
if (msProjectionsDiffer(&in, &out))
@@ -2113,6 +2111,8 @@
bSetNewExtents =1;
}
}
+ // Free the temporary projection object
+ msFreeProjection(&out);
if (bWKTProj)
nStatus = mapObj_setWKTProjection(self, pProjString->value.str.val);
More information about the mapserver-commits
mailing list