aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-09-02 18:13:00 +0000
committerdrh <drh@noemail.net>2010-09-02 18:13:00 +0000
commit7ff2719e889d16c180baef63c39e721ea874db30 (patch)
tree284b7ff2aaf8093118b11763c885dd8c646afa48 /src/malloc.c
parent1ff6e3ab899ed014860e69c2dca5a9ea3ade6d2c (diff)
downloadsqlite-7ff2719e889d16c180baef63c39e721ea874db30.tar.gz
sqlite-7ff2719e889d16c180baef63c39e721ea874db30.zip
Fix an off-by-one error in the scratch memory allocator.
FossilOrigin-Name: 5a9591607a0a5ba4527bf2a90179651053244953
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/malloc.c b/src/malloc.c
index b8d47ad85..85ba9468c 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -127,7 +127,7 @@ int sqlite3MallocInit(void){
mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
}
if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
- && sqlite3GlobalConfig.nScratch>=0 ){
+ && sqlite3GlobalConfig.nScratch>0 ){
int i, n, sz;
ScratchFreeslot *pSlot;
sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);