aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-09-13 16:36:46 +0000
committerdrh <drh@noemail.net>2013-09-13 16:36:46 +0000
commit9ccd8659ff397dc03dd2c40f8d13e12d5445c01f (patch)
tree968995f7a44e1c4471fc5ed80834eb740f8ca7f1 /src/malloc.c
parentf1d2670d40185393386e3c76291d83beb7eb3ad5 (diff)
downloadsqlite-9ccd8659ff397dc03dd2c40f8d13e12d5445c01f.tar.gz
sqlite-9ccd8659ff397dc03dd2c40f8d13e12d5445c01f.zip
Change the PRAGMA parser to use a binary search for the pragma name.
Also: Minor performance enhancement to sqlite3DbFree() and to the token dequoter. FossilOrigin-Name: 870c030b4e1854e6e0d39907fadbd82774c16f56
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 35a44e5f6..799f0485d 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -484,6 +484,7 @@ void sqlite3_free(void *p){
*/
void sqlite3DbFree(sqlite3 *db, void *p){
assert( db==0 || sqlite3_mutex_held(db->mutex) );
+ if( p==0 ) return;
if( db ){
if( db->pnBytesFreed ){
*db->pnBytesFreed += sqlite3DbMallocSize(db, p);