Fix memory leaks by using sqlite3_close_v2

This commit is contained in:
Matthias Kuhn 2017-11-20 16:41:05 +01:00
parent 3eced50c6d
commit 6d0f2afe4f
2 changed files with 3 additions and 3 deletions

View File

@ -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 );

View File

@ -21,7 +21,7 @@
void QgsSqlite3Closer::operator()( sqlite3 *database )
{
sqlite3_close( database );
sqlite3_close_v2( database );
}
void QgsSqlite3StatementFinalizer::operator()( sqlite3_stmt *statement )