From 3755f418be5c3608a7e0b59488a8e172d443d738 Mon Sep 17 00:00:00 2001
From: zwtmichael <zhuwentao5@huawei.com>
Date: Tue, 30 Aug 2022 17:02:04 +0800
Subject: [PATCH] fix memory problem in the rtree test suite

---
 ext/rtree/test_rtreedoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/rtree/test_rtreedoc.c b/ext/rtree/test_rtreedoc.c
index 119be0e..cdbcb2e 100644
--- a/ext/rtree/test_rtreedoc.c
+++ b/ext/rtree/test_rtreedoc.c
@@ -324,7 +324,7 @@ static int SQLITE_TCLAPI register_box_query(
   }
   if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
 
-  pCtx = (BoxQueryCtx*)ckalloc(sizeof(BoxQueryCtx*));
+  pCtx = (BoxQueryCtx*)ckalloc(sizeof(BoxQueryCtx));
   pCtx->interp = interp;
   pCtx->pScript = Tcl_DuplicateObj(objv[2]);
   Tcl_IncrRefCount(pCtx->pScript);
-- 
2.23.0

