1
0
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:
drh
2016-01-16 03:16:19 +00:00
parent 079d446dd2
commit 095fb474ef
3 changed files with 8 additions and 8 deletions

View File

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