diff --git a/source/libs/scalar/src/sclvector.c b/source/libs/scalar/src/sclvector.c index ff677d2f7b62199813ff4acbf1b038bae2379d19..05456790a5ecd1988fbec7ee24672055b941a8e6 100644 --- a/source/libs/scalar/src/sclvector.c +++ b/source/libs/scalar/src/sclvector.c @@ -189,10 +189,10 @@ static FORCE_INLINE void varToNchar(char* buf, SScalarParam* pOut, int32_t rowIn taosMemoryFree(t); } -//TODO opt performance +//TODO opt performance, tmp is not needed. int32_t vectorConvertFromVarData(const SScalarParam* pIn, SScalarParam* pOut, int32_t inType, int32_t outType) { int32_t bufSize = pIn->columnData->info.bytes; - char *tmp = taosMemoryMalloc(bufSize); + char *tmp = taosMemoryMalloc(bufSize + VARSTR_HEADER_SIZE); bool vton = false;