diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index c8f0b3d8263a1809d0e7578757949607342127db..72093793a1b4baba3f62d6144e3031aecd1ce8ac 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -5451,6 +5451,8 @@ int32_t modeFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { colDataAppendNULL(pCol, currentRow); } + taosHashCleanup(pInfo->pHash); + return pResInfo->numOfRes; }