mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix a problem that could cause a crash if a blob handle were closed after the associated database handle was closed using sqlite3_close_v2().
FossilOrigin-Name: 52f463d29407fad691c42b13462880e7605603c9be9f480d18e953a0ef78149a
This commit is contained in:
@@ -355,11 +355,12 @@ int sqlite3_blob_close(sqlite3_blob *pBlob){
|
||||
sqlite3 *db;
|
||||
|
||||
if( p ){
|
||||
sqlite3_stmt *pStmt = p->pStmt;
|
||||
db = p->db;
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
rc = sqlite3_finalize(p->pStmt);
|
||||
sqlite3DbFree(db, p);
|
||||
sqlite3_mutex_leave(db->mutex);
|
||||
rc = sqlite3_finalize(pStmt);
|
||||
}else{
|
||||
rc = SQLITE_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user