diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-09-23 16:41:29 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-09-23 16:41:29 +0000 |
commit | 98c21903bd63257d98ead162762fbf2249b595e3 (patch) | |
tree | 8deac2db8dc4ae6312ae4d1e53b86a4044750af2 /src/malloc.c | |
parent | 40bbb0a3e8b1ef8392c19ee1f6e213474fcdf3e1 (diff) | |
download | sqlite-98c21903bd63257d98ead162762fbf2249b595e3.tar.gz sqlite-98c21903bd63257d98ead162762fbf2249b595e3.zip |
Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738)
FossilOrigin-Name: 046ef07261d520c9399bd8cdfdfd5281956b7a27
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/malloc.c b/src/malloc.c index 439405d53..65fdc26d0 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -12,7 +12,7 @@ ** ** Memory allocation functions used throughout sqlite. ** -** $Id: malloc.c,v 1.41 2008/09/04 04:32:49 shane Exp $ +** $Id: malloc.c,v 1.42 2008/09/23 16:41:30 danielk1977 Exp $ */ #include "sqliteInt.h" #include <stdarg.h> @@ -752,7 +752,7 @@ int sqlite3ApiExit(sqlite3* db, int rc){ ** is unsafe, as is the call to sqlite3Error(). */ assert( !db || sqlite3_mutex_held(db->mutex) ); - if( db && db->mallocFailed ){ + if( db && (db->mallocFailed || rc==SQLITE_IOERR_NOMEM) ){ sqlite3Error(db, SQLITE_NOMEM, 0); db->mallocFailed = 0; rc = SQLITE_NOMEM; |