fix(stream): avoid memory leak.
This commit is contained in:
parent
5e16db4e19
commit
e1700d00dc
|
@ -288,14 +288,7 @@ int32_t tAppendDataToInputQueue(SStreamTask* pTask, SStreamQueueItem* pItem) {
|
||||||
int8_t type = pItem->type;
|
int8_t type = pItem->type;
|
||||||
|
|
||||||
if (type == STREAM_INPUT__DATA_SUBMIT) {
|
if (type == STREAM_INPUT__DATA_SUBMIT) {
|
||||||
SStreamDataSubmit2* pSubmitBlock = streamSubmitBlockClone((SStreamDataSubmit2*)pItem);
|
SStreamDataSubmit2* pSubmitBlock = (SStreamDataSubmit2*)pItem;
|
||||||
if (pSubmitBlock == NULL) {
|
|
||||||
qDebug("task %d %p submit enqueue failed since out of memory", pTask->id.taskId, pTask);
|
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
|
||||||
atomic_store_8(&pTask->inputStatus, TASK_INPUT_STATUS__FAILED);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t total = taosQueueItemSize(pTask->inputQueue->queue) + 1;
|
int32_t total = taosQueueItemSize(pTask->inputQueue->queue) + 1;
|
||||||
qDebug("s-task:%s submit enqueue %p %p msgLen:%d ver:%" PRId64 ", total in queue:%d", pTask->id.idStr,
|
qDebug("s-task:%s submit enqueue %p %p msgLen:%d ver:%" PRId64 ", total in queue:%d", pTask->id.idStr,
|
||||||
pItem, pSubmitBlock->submit.msgStr, pSubmitBlock->submit.msgLen,
|
pItem, pSubmitBlock->submit.msgStr, pSubmitBlock->submit.msgLen,
|
||||||
|
|
Loading…
Reference in New Issue