mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
The malloc.test script now passes all tests with no errors. (CVS 4271)
FossilOrigin-Name: db818430e9ea4ef4a4af575784009d5acae785a3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user