aboutsummaryrefslogtreecommitdiff
path: root/src/test_func.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-09-18 21:25:33 +0000
committerdrh <drh@noemail.net>2014-09-18 21:25:33 +0000
commit17bcb102993a155dec69a58e2f079a880e1967b7 (patch)
tree8abc9f4462b8269582e7e4aa23c7af3dd82dd360 /src/test_func.c
parent26c79a060b2e7fdf6d05585a3b44d0498df3fe1c (diff)
downloadsqlite-17bcb102993a155dec69a58e2f079a880e1967b7.tar.gz
sqlite-17bcb102993a155dec69a58e2f079a880e1967b7.zip
Add the Mem.szMalloc element to the Mem object and use it to keep track of
the size of the Mem.zMalloc allocation. FossilOrigin-Name: 9c09ac353df6041808cace41880f4729ee73f5e1
Diffstat (limited to 'src/test_func.c')
-rw-r--r--src/test_func.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test_func.c b/src/test_func.c
index 9cf2f8002..c7850631d 100644
--- a/src/test_func.c
+++ b/src/test_func.c
@@ -504,7 +504,7 @@ static void test_extract(
sqlite3_result_value(context, &mem);
}
- sqlite3DbFree(db, mem.zMalloc);
+ if( mem.szMalloc ) sqlite3DbFree(db, mem.zMalloc);
}
}
@@ -591,7 +591,7 @@ static void test_decode(
Tcl_ListObjAppendElement(0, pRet, pVal);
- if( mem.zMalloc ){
+ if( mem.szMalloc ){
sqlite3DbFree(db, mem.zMalloc);
}
}