aboutsummaryrefslogtreecommitdiff
path: root/src/callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callback.c')
-rw-r--r--src/callback.c8
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;
}