diff options
author | drh <drh@noemail.net> | 2011-05-07 18:40:36 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-05-07 18:40:36 +0000 |
commit | ffd9668fb5c64a542ed8a54598e8e347bc12d963 (patch) | |
tree | 06634fa4fe0ff86642c7bd52c70ef6ab064e72b7 /src | |
parent | 5dd72ad6df8040a8799c0b6ec483f3d1d6f0099a (diff) | |
download | sqlite-ffd9668fb5c64a542ed8a54598e8e347bc12d963.tar.gz sqlite-ffd9668fb5c64a542ed8a54598e8e347bc12d963.zip |
Set the sqlite3.mallocFailed flag if sqlite3ParseUri fails with SQLITE_NOMEM.
FossilOrigin-Name: ca3797d4967361e31a8a5ce1ce8190b095f3ed4c
Diffstat (limited to 'src')
-rw-r--r-- | src/attach.c | 1 | ||||
-rw-r--r-- | src/main.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/attach.c b/src/attach.c index 7e6f7c1fb..18f8823b3 100644 --- a/src/attach.c +++ b/src/attach.c @@ -131,6 +131,7 @@ static void attachFunc( flags = db->openFlags; rc = sqlite3ParseUri(db->pVfs->zName, zFile, &flags, &pVfs, &zPath, &zErr); if( rc!=SQLITE_OK ){ + if( rc==SQLITE_NOMEM ) db->mallocFailed = 1; sqlite3_result_error(context, zErr, -1); sqlite3_free(zErr); return; diff --git a/src/main.c b/src/main.c index f941a9398..6fdffcd87 100644 --- a/src/main.c +++ b/src/main.c @@ -2162,6 +2162,7 @@ static int openDatabase( /* Parse the filename/URI argument. */ rc = sqlite3ParseUri(zVfs, zFilename, &flags, &db->pVfs, &zOpen, &zErrMsg); if( rc!=SQLITE_OK ){ + if( rc==SQLITE_NOMEM ) db->mallocFailed = 1; sqlite3Error(db, rc, zErrMsg ? "%s" : 0, zErrMsg); sqlite3_free(zErrMsg); goto opendb_out; |