aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-08-17 16:01:11 +0000
committerdrh <drh@noemail.net>2009-08-17 16:01:11 +0000
commitadad77a6c608fd8b29a7b5b2ff75331c303e9ea8 (patch)
tree35f9d476ec75f2ff668dfd5a7a1f6ec54f6526dd /src
parent3d6e060b48316ddf638e9b496d68d37a5d7c526e (diff)
downloadsqlite-adad77a6c608fd8b29a7b5b2ff75331c303e9ea8.tar.gz
sqlite-adad77a6c608fd8b29a7b5b2ff75331c303e9ea8.zip
Always call sqlite3_malloc() in sqlite3OsInit(), even when not compiled
with SQLITE_TEST. FossilOrigin-Name: b98a8706a61ad27c881b6820eee10d06bfb27417
Diffstat (limited to 'src')
-rw-r--r--src/os.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os.c b/src/os.c
index 4adf12396..7f080ecd4 100644
--- a/src/os.c
+++ b/src/os.c
@@ -197,7 +197,9 @@ int sqlite3OsCloseFree(sqlite3_file *pFile){
** error in sqlite3_os_init() by the upper layers can be tested.
*/
int sqlite3OsInit(void){
- DO_OS_MALLOC_TEST(0);
+ void *p = sqlite3_malloc(10);
+ if( p==0 ) return SQLITE_NOMEM;
+ sqlite3_free(p);
return sqlite3_os_init();
}