fix: memory leak of geos

This commit is contained in:
kailixu 2024-08-24 10:36:19 +08:00
parent 6cd7fd0288
commit 3c7ec707b2
1 changed files with 3 additions and 1 deletions

View File

@ -82,4 +82,6 @@ _exit:
TAOS_RETURN(code);
}
const char *getGeosErrMsg(int32_t code) { return tlGeosCtx ? tlGeosCtx->errMsg : code ? strerror(code) : ""; }
const char *getGeosErrMsg(int32_t code) {
return (tlGeosCtx && tlGeosCtx->errMsg[0] != 0) ? tlGeosCtx->errMsg : (code ? tstrerror(code) : "");
}