fix mem leak
This commit is contained in:
parent
2549516cbf
commit
4cd35d76db
|
@ -734,7 +734,7 @@ void flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot, boo
|
||||||
// todo handle failure
|
// todo handle failure
|
||||||
memset(buf, 0, len);
|
memset(buf, 0, len);
|
||||||
}
|
}
|
||||||
taosMemoryFree(buf);
|
taosMemoryFreeClear(buf);
|
||||||
|
|
||||||
int32_t numOfElems = streamStateGetBatchSize(batch);
|
int32_t numOfElems = streamStateGetBatchSize(batch);
|
||||||
if (numOfElems > 0) {
|
if (numOfElems > 0) {
|
||||||
|
@ -769,6 +769,7 @@ _end:
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
qError("%s failed at line %d since %s", __func__, lino, tstrerror(code));
|
qError("%s failed at line %d since %s", __func__, lino, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
taosMemoryFree(buf);
|
||||||
streamStateDestroyBatch(batch);
|
streamStateDestroyBatch(batch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue