1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738)

FossilOrigin-Name: 046ef07261d520c9399bd8cdfdfd5281956b7a27
This commit is contained in:
danielk1977
2008-09-23 16:41:29 +00:00
parent 40bbb0a3e8
commit 98c21903bd
7 changed files with 36 additions and 27 deletions

View File

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