Skip to content
Permalink
Browse files

Merge pull request #7151 from rouault/fix_use_after_free_at_qgis_exit

Fix use-after-free at QGIS exist, linked to QgsCoordinateTransform cache
  • Loading branch information
rouault committed Jun 3, 2018
2 parents 164f662 + 6b7504d commit 851319f444dfff305de4c3b199aef4af5168f75b
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgsapplication.cpp
@@ -1084,6 +1084,11 @@ void QgsApplication::exitQgis()

delete QgsProviderRegistry::instance();

// invalidate coordinate cache while the PROJ context held by the thread-locale
// QgsProjContextStore object is still alive. Otherwise if this later object
// is destroyed before the static variables of the cache, we might use freed memory.
QgsCoordinateTransform::invalidateCache();

// tear-down GDAL/OGR
OGRCleanupAll();
GDALDestroyDriverManager();

0 comments on commit 851319f

Please sign in to comment.
You can’t perform that action at this time.