Skip to content
Permalink
Browse files

Fix memory leaks by using sqlite3_close_v2

  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent 3eced50 commit 6d0f2afe4fab7645c089cc652cff3ba41a1f78d7
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/core/qgsspatialiteutils.cpp
  2. +1 −1 src/core/qgssqliteutils.cpp
@@ -75,10 +75,10 @@ sqlite3_statement_unique_ptr spatialite_database_unique_ptr::prepare( const QStr

void QgsSpatialiteCloser::operator()( sqlite3 *handle )
{
int res = sqlite3_close( handle );
int res = sqlite3_close_v2( handle );
if ( res != SQLITE_OK )
{
QgsDebugMsg( QStringLiteral( "sqlite3_close() failed: %1" ).arg( res ) );
QgsDebugMsg( QStringLiteral( "sqlite3_close_v2() failed: %1" ).arg( res ) );
}

spatialite_cleanup_ex( mSpatialiteContext );
@@ -21,7 +21,7 @@

void QgsSqlite3Closer::operator()( sqlite3 *database )
{
sqlite3_close( database );
sqlite3_close_v2( database );
}

void QgsSqlite3StatementFinalizer::operator()( sqlite3_stmt *statement )

0 comments on commit 6d0f2af

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