From bab891eef776556445fd4ffde743186661f1598d Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 28 Nov 2022 18:14:47 +0800 Subject: [PATCH] fix coverity scan issue CID:402965 --- source/libs/function/src/builtinsimpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 08e1549501..8c20a2c72b 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -3613,6 +3613,7 @@ bool histogramFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultIn char* binDesc = strndup(varDataVal(pCtx->param[2].param.pz), varDataLen(pCtx->param[2].param.pz)); int64_t normalized = pCtx->param[3].param.i; if (normalized != 0 && normalized != 1) { + taosMemoryFree(binDesc); return false; } if (!getHistogramBinDesc(pInfo, binDesc, binType, (bool)normalized)) {