mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix memory leaks by using sqlite3_close_v2
This commit is contained in:
parent
3eced50c6d
commit
6d0f2afe4f
@ -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 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user