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

Set the sqlite3.mallocFailed flag if sqlite3ParseUri fails with SQLITE_NOMEM.

FossilOrigin-Name: ca3797d4967361e31a8a5ce1ce8190b095f3ed4c
This commit is contained in:
drh
2011-05-07 18:40:36 +00:00
parent 5dd72ad6df
commit ffd9668fb5
4 changed files with 10 additions and 8 deletions

View File

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