Skip to content

Commit

Permalink
fix leaks calling OGR_DS_ExecuteSQL (fixes #1083)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@8420 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 10, 2008
1 parent 2429630 commit f0386c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ void QgsOgrProvider::getUniqueValues(int index, QStringList &uniqueValues)
OGR_F_Destroy(f);
}

OGR_DS_ReleaseResultSet(l, ogrDataSource);
OGR_DS_ReleaseResultSet(ogrDataSource, l);
}


Expand All @@ -1309,7 +1309,7 @@ QVariant QgsOgrProvider::minValue(int index)
OGRFeatureH f = OGR_L_GetNextFeature(l);
if(f==0)
{
OGR_DS_ReleaseResultSet(l, ogrDataSource);
OGR_DS_ReleaseResultSet(ogrDataSource, l);
return QVariant();
}

Expand All @@ -1327,7 +1327,7 @@ QVariant QgsOgrProvider::minValue(int index)
default: assert(NULL && "unsupported field type");
}

OGR_DS_ReleaseResultSet(l, ogrDataSource);
OGR_DS_ReleaseResultSet(ogrDataSource, l);

return value;
}
Expand All @@ -1348,7 +1348,7 @@ QVariant QgsOgrProvider::maxValue(int index)
OGRFeatureH f = OGR_L_GetNextFeature(l);
if(f==0)
{
OGR_DS_ReleaseResultSet(l, ogrDataSource);
OGR_DS_ReleaseResultSet(ogrDataSource, l);
return QVariant();
}

Expand All @@ -1366,7 +1366,7 @@ QVariant QgsOgrProvider::maxValue(int index)
default: assert(NULL && "unsupported field type");
}

OGR_DS_ReleaseResultSet(l, ogrDataSource);
OGR_DS_ReleaseResultSet(ogrDataSource, l);

return value;
}

0 comments on commit f0386c6

Please sign in to comment.