fix(stream): fix double free
This commit is contained in:
parent
0c7373509e
commit
0f8ff48c6b
|
@ -9624,6 +9624,8 @@ void tDestroySubmitTbData(SSubmitTbData *pTbData, int32_t flag) {
|
||||||
taosArrayDestroy(pTbData->aRowP);
|
taosArrayDestroy(pTbData->aRowP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pTbData->aRowP = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tDestroySubmitReq(SSubmitReq2 *pReq, int32_t flag) {
|
void tDestroySubmitReq(SSubmitReq2 *pReq, int32_t flag) {
|
||||||
|
|
|
@ -583,7 +583,7 @@ int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDat
|
||||||
|
|
||||||
if (IS_SET_NULL(pCol)) {
|
if (IS_SET_NULL(pCol)) {
|
||||||
if (pCol->flags & COL_IS_KEY) {
|
if (pCol->flags & COL_IS_KEY) {
|
||||||
qError("ts:%" PRId64 " Primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8, ts,
|
qError("ts:%" PRId64 " primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8, ts,
|
||||||
pCol->colId, pCol->type);
|
pCol->colId, pCol->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDat
|
||||||
SColumnInfoData* pColData = taosArrayGet(pDataBlock->pDataBlock, dataIndex);
|
SColumnInfoData* pColData = taosArrayGet(pDataBlock->pDataBlock, dataIndex);
|
||||||
if (colDataIsNull_s(pColData, j)) {
|
if (colDataIsNull_s(pColData, j)) {
|
||||||
if (pCol->flags & COL_IS_KEY) {
|
if (pCol->flags & COL_IS_KEY) {
|
||||||
qError("ts:%" PRId64 "Primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8,
|
qError("ts:%" PRId64 " primary key column should not be null, colId:%" PRIi16 ", colType:%" PRIi8,
|
||||||
ts, pCol->colId, pCol->type);
|
ts, pCol->colId, pCol->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -624,8 +624,8 @@ int32_t doConvertRows(SSubmitTbData* pTableData, const STSchema* pTSchema, SSDat
|
||||||
code = tRowBuild(pVals, (STSchema*)pTSchema, &pRow);
|
code = tRowBuild(pVals, (STSchema*)pTSchema, &pRow);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
tDestroySubmitTbData(pTableData, TSDB_MSG_FLG_ENCODE);
|
tDestroySubmitTbData(pTableData, TSDB_MSG_FLG_ENCODE);
|
||||||
pTableData->aRowP = taosArrayDestroy(pTableData->aRowP);
|
|
||||||
taosArrayDestroy(pVals);
|
taosArrayDestroy(pVals);
|
||||||
|
tqError("s-task:%s build rows for submit failed, ts:%"PRId64, id, ts);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue