diff options
author | drh <drh@noemail.net> | 2007-08-22 20:18:21 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-08-22 20:18:21 +0000 |
commit | f3a65f7e443865f00b6799ba9637604b0ae55dc5 (patch) | |
tree | 5fc48b237b66cb49164f136fd222f6a49a21c304 /src/callback.c | |
parent | dd97a49c1a90e31dae5d47ee91e2618eb4b57eb8 (diff) | |
download | sqlite-f3a65f7e443865f00b6799ba9637604b0ae55dc5.tar.gz sqlite-f3a65f7e443865f00b6799ba9637604b0ae55dc5.zip |
The malloc.test script now passes all tests with no errors. (CVS 4271)
FossilOrigin-Name: db818430e9ea4ef4a4af575784009d5acae785a3
Diffstat (limited to 'src/callback.c')
-rw-r--r-- | src/callback.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/callback.c b/src/callback.c index 46de7661a..181f26f1b 100644 --- a/src/callback.c +++ b/src/callback.c @@ -13,7 +13,7 @@ ** This file contains functions used to access the internal hash tables ** of user defined functions and collation sequences. ** -** $Id: callback.c,v 1.21 2007/08/21 19:33:56 drh Exp $ +** $Id: callback.c,v 1.22 2007/08/22 20:18:22 drh Exp $ */ #include "sqliteInt.h" @@ -179,8 +179,9 @@ static CollSeq *findCollSeqEntry( ** return the pColl pointer to be deleted (because it wasn't added ** to the hash table). */ - assert( !pDel || (db->mallocFailed && pDel==pColl) ); - if( pDel ){ + assert( pDel==0 || pDel==pColl ); + if( pDel!=0 ){ + db->mallocFailed = 1; sqlite3_free(pDel); pColl = 0; } @@ -310,6 +311,7 @@ FuncDef *sqlite3FindFunction( memcpy(pBest->zName, zName, nName); pBest->zName[nName] = 0; if( pBest==sqlite3HashInsert(&db->aFunc,pBest->zName,nName,(void*)pBest) ){ + db->mallocFailed = 1; sqlite3_free(pBest); return 0; } |