mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a potential use-after-free problem when compiling with SQLITE_HAS_CODEC.
FossilOrigin-Name: 653ea15ad8e23b333e234eb5dde7b80134db2baf
This commit is contained in:
@@ -2969,7 +2969,6 @@ static int openDatabase(
|
||||
sqlite3_wal_autocheckpoint(db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT);
|
||||
|
||||
opendb_out:
|
||||
sqlite3_free(zOpen);
|
||||
if( db ){
|
||||
assert( db->mutex!=0 || isThreadsafe==0
|
||||
|| sqlite3GlobalConfig.bFullMutex==0 );
|
||||
@@ -3006,6 +3005,7 @@ opendb_out:
|
||||
}
|
||||
}
|
||||
#endif
|
||||
sqlite3_free(zOpen);
|
||||
return rc & 0xff;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user