fix coverity scan issue CID:402965

This commit is contained in:
Ganlin Zhao 2022-11-28 18:14:47 +08:00
parent f3d790c090
commit bab891eef7
1 changed files with 1 additions and 0 deletions

View File

@ -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)) {