[QGIS Commit] r8420 - trunk/qgis/src/providers/ogr

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat May 10 12:40:36 EDT 2008


Author: jef
Date: 2008-05-10 12:40:36 -0400 (Sat, 10 May 2008)
New Revision: 8420

Modified:
   trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
Log:
fix leaks calling OGR_DS_ExecuteSQL (fixes #1083)

Modified: trunk/qgis/src/providers/ogr/qgsogrprovider.cpp
===================================================================
--- trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-05-10 11:38:30 UTC (rev 8419)
+++ trunk/qgis/src/providers/ogr/qgsogrprovider.cpp	2008-05-10 16:40:36 UTC (rev 8420)
@@ -1287,7 +1287,7 @@
     OGR_F_Destroy(f);
   }
 
-  OGR_DS_ReleaseResultSet(l, ogrDataSource);
+  OGR_DS_ReleaseResultSet(ogrDataSource, l);
 }
 
 
@@ -1309,7 +1309,7 @@
   OGRFeatureH f = OGR_L_GetNextFeature(l);
   if(f==0)
   {
-    OGR_DS_ReleaseResultSet(l, ogrDataSource);
+    OGR_DS_ReleaseResultSet(ogrDataSource, l);
     return QVariant();
   }
 
@@ -1327,7 +1327,7 @@
     default: assert(NULL && "unsupported field type");
   }
   
-  OGR_DS_ReleaseResultSet(l, ogrDataSource);
+  OGR_DS_ReleaseResultSet(ogrDataSource, l);
 
   return value;
 }
@@ -1348,7 +1348,7 @@
   OGRFeatureH f = OGR_L_GetNextFeature(l);
   if(f==0)
   {
-    OGR_DS_ReleaseResultSet(l, ogrDataSource);
+    OGR_DS_ReleaseResultSet(ogrDataSource, l);
     return QVariant();
   }
 
@@ -1366,7 +1366,7 @@
     default: assert(NULL && "unsupported field type");
   }
   
-  OGR_DS_ReleaseResultSet(l, ogrDataSource);
+  OGR_DS_ReleaseResultSet(ogrDataSource, l);
 
   return value;
 }



More information about the QGIS-commit mailing list