fix: memory leak of geos

This commit is contained in:
kailixu 2024-08-24 14:30:36 +08:00
parent 825db81bef
commit 401673318c
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ int32_t getThreadLocalGeosCtx(SGeosContext **ppCtx) {
TAOS_CHECK_EXIT(TAOS_SYSTEM_ERROR(errno));
}
if ((taosThreadSetSpecific(tlGeosCtxKey, &tlGeosCtxObj)) != 0) {
TAOS_CHECK_EXIT(TAOS_SYSTEM_ERROR(errno));
}
tlGeosCtx = &tlGeosCtxObj;
*ppCtx = tlGeosCtx;
_exit: