mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Some elements of the new malloc() failure handling. Not all cases work properly yet. Also, library is not threadsafe if malloc() fails right now. (CVS 2800)
FossilOrigin-Name: e1606658f1b4530e3001db4779b5669c8d13c853
This commit is contained in:
@@ -156,6 +156,8 @@ int sqlite3_step(sqlite3_stmt *pStmt){
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
|
||||
assert(!sqlite3Tsd()->mallocFailed);
|
||||
|
||||
if( p==0 || p->magic!=VDBE_MAGIC_RUN ){
|
||||
return SQLITE_MISUSE;
|
||||
}
|
||||
@@ -239,6 +241,7 @@ int sqlite3_step(sqlite3_stmt *pStmt){
|
||||
#endif
|
||||
|
||||
sqlite3Error(p->db, rc, p->zErrMsg ? "%s" : 0, p->zErrMsg);
|
||||
sqlite3ClearMallocFailed();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user