Merge pull request #28919 from taosdata/fix/TD-33006-main
fix(query)[TD-33006]. resolve wild pointer release issue in tsdbCreateReader
This commit is contained in:
commit
091a5d9dab
|
@ -210,7 +210,7 @@ static int32_t setColumnIdSlotList(SBlockLoadSuppInfo* pSupInfo, SColumnInfo* pC
|
|||
pSupInfo->smaValid = true;
|
||||
pSupInfo->numOfCols = numOfCols;
|
||||
|
||||
pSupInfo->colId = taosMemoryMalloc(numOfCols * (sizeof(int16_t) * 2 + POINTER_BYTES));
|
||||
pSupInfo->colId = taosMemoryCalloc(numOfCols, sizeof(int16_t) * 2 + POINTER_BYTES);
|
||||
TSDB_CHECK_NULL(pSupInfo->colId, code, lino, _end, terrno);
|
||||
|
||||
pSupInfo->slotId = (int16_t*)((char*)pSupInfo->colId + (sizeof(int16_t) * numOfCols));
|
||||
|
|
Loading…
Reference in New Issue