Bug report #1083

OGR SQL result set leaks due to incorrect call of deallocator

Added by Mateusz Loskot - almost 16 years ago. Updated almost 16 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:-
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11143

Description

In file [source:trunk/qgis/src/providers/ogr/qgsogrprovider.cpp@8406#L1290 qgsogrprovider.cpp], line 1290, invalid call of function OGR_DS_ReleaseResultSet causes memory leak in GDAL/OGR.

The function is called with parameters in incorrect order:

OGR_DS_ReleaseResultSet(l, ogrDataSource);

but it should read

OGR_DS_ReleaseResultSet(ogrDataSource, l);

In other words, datasource handle goes first, then layer handle (see OGR_DS_ReleaseResultSet prototype).

Associated revisions

Revision 1ef1e9c0
Added by Jürgen Fischer almost 16 years ago

fix leaks calling OGR_DS_ExecuteSQL (fixes #1083)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8420 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision f0386c65
Added by Jürgen Fischer almost 16 years ago

fix leaks calling OGR_DS_ExecuteSQL (fixes #1083)

git-svn-id: http://svn.osgeo.org/qgis/trunk@8420 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Jürgen Fischer almost 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

fixed in

Also available in: Atom PDF