diff options
author | drh <drh@noemail.net> | 2006-04-10 13:37:47 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-04-10 13:37:47 +0000 |
commit | a06ab2ca23b2740c06b07208abc39e3f40719d16 (patch) | |
tree | cc52c4ee080fd262228f2e4a5069fbf84f7f1325 /src | |
parent | 15abd02897a0f85431fb8a4e92c54d7a9e935ce9 (diff) | |
download | sqlite-a06ab2ca23b2740c06b07208abc39e3f40719d16.tar.gz sqlite-a06ab2ca23b2740c06b07208abc39e3f40719d16.zip |
Follow-up to check-in (3164). Make sure SQLITE_NOMEM is returned after
a memory allocation failure. It is not sufficent to return an "out of memory"
error message. The return code needs to be SQLITE_NOMEM. (CVS 3172)
FossilOrigin-Name: 9d95750e8556aef20a637a815652d547ed2f887c
Diffstat (limited to 'src')
-rw-r--r-- | src/attach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attach.c b/src/attach.c index 318ffa508..7e823930b 100644 --- a/src/attach.c +++ b/src/attach.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to implement the ATTACH and DETACH commands. ** -** $Id: attach.c,v 1.50 2006/04/05 11:57:37 drh Exp $ +** $Id: attach.c,v 1.51 2006/04/10 13:37:47 drh Exp $ */ #include "sqliteInt.h" @@ -186,7 +186,7 @@ static void attachFunc( sqlite3ResetInternalSchema(db, 0); db->nDb = iDb; if( rc==SQLITE_NOMEM ){ - sqlite3MallocFailed(); + if( !sqlite3MallocFailed() ) sqlite3FailedMalloc(); sqlite3_snprintf(127, zErr, "out of memory"); }else{ sqlite3_snprintf(127, zErr, "unable to open database: %s", zFile); |