/ Check-in [4d3cf9e1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Restore the test for sqlite3OsFullPathname() failure that was mistakenly removed when [ceee03c79a] was backed out by [69ec53fc1c].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4d3cf9e1d8ac356db5a708913f614e42a6a56b94
User & Date: drh 2011-11-17 11:43:19
Context
2011-11-17
11:49
Improvements to the documentation of the sqlite3_db_filename() interface. check-in: 1c45b2a0 user: drh tags: trunk
11:43
Restore the test for sqlite3OsFullPathname() failure that was mistakenly removed when [ceee03c79a] was backed out by [69ec53fc1c]. check-in: 4d3cf9e1 user: drh tags: trunk
00:56
Add the sqlite3_db_filename() interface. check-in: 93a94798 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  1772   1772         char *zFullPathname = sqlite3Malloc(nFullPathname);
  1773   1773         MUTEX_LOGIC( sqlite3_mutex *mutexShared; )
  1774   1774         p->sharable = 1;
  1775   1775         if( !zFullPathname ){
  1776   1776           sqlite3_free(p);
  1777   1777           return SQLITE_NOMEM;
  1778   1778         }
  1779         -      sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);
         1779  +      rc = sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);
         1780  +      if( rc ){
         1781  +        sqlite3_free(zFullPathname);
         1782  +        sqlite3_free(p);
         1783  +        return rc;
         1784  +      }
  1780   1785   #if SQLITE_THREADSAFE
  1781   1786         mutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);
  1782   1787         sqlite3_mutex_enter(mutexOpen);
  1783   1788         mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
  1784   1789         sqlite3_mutex_enter(mutexShared);
  1785   1790   #endif
  1786   1791         for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){