[mapserver-commits] r9687 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Jan 13 14:22:58 EST 2010


Author: aboudreault
Date: 2010-01-13 14:22:57 -0500 (Wed, 13 Jan 2010)
New Revision: 9687

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogr.cpp
Log:
Fixed OGR datasource double free (#3261)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-01-13 14:41:40 UTC (rev 9686)
+++ trunk/mapserver/HISTORY.TXT	2010-01-13 19:22:57 UTC (rev 9687)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed OGR datasource double free (#3261)
+ 
 - Fix compilation warnings around use of strcasestr (#3257)
 
 - Made %substitution% strings case insensitive (#3250)

Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp	2010-01-13 14:41:40 UTC (rev 9686)
+++ trunk/mapserver/mapogr.cpp	2010-01-13 19:22:57 UTC (rev 9687)
@@ -1450,9 +1450,9 @@
                      "ExecuteSQL(%s) failed.\n%s",
                      "msOGRFileOpen()", 
                      pszLayerDef, CPLGetLastErrorMsg() );
-          OGR_DS_Destroy( hDS );
-          CPLFree( pszLayerDef );
           RELEASE_OGR_LOCK;
+          msConnPoolRelease( layer, hDS );
+          CPLFree( pszLayerDef );
           return NULL;
       }
       RELEASE_OGR_LOCK;
@@ -1465,9 +1465,7 @@
                  "msOGRFileOpen()", 
                  pszLayerDef, connection );
       CPLFree( pszLayerDef );
-      ACQUIRE_OGR_LOCK;
-      OGR_DS_Destroy( hDS );
-      RELEASE_OGR_LOCK;
+      msConnPoolRelease( layer, hDS );
       return NULL;
   }
 



More information about the mapserver-commits mailing list