From c6cc433caff1eb937f879c5a2aefbed3d3dced87 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 24 Oct 2020 14:44:42 +0800 Subject: [PATCH] [td-1373] fix memory leak --- src/query/src/qTsbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/query/src/qTsbuf.c b/src/query/src/qTsbuf.c index eefb0b56a4..42b6e3f6e0 100644 --- a/src/query/src/qTsbuf.c +++ b/src/query/src/qTsbuf.c @@ -400,11 +400,11 @@ void tsBufAppend(STSBuf* pTSBuf, int32_t vnodeId, tVariant* tag, const char* pDa if ((tVariantCompare(&pTSBuf->block.tag, tag) != 0) && ptsData->len > 0) { // new arrived data with different tags value, save current value into disk first writeDataToDisk(pTSBuf); - tVariantAssign(&pTSBuf->block.tag, tag); } else { expandBuffer(ptsData, len); } - + + tVariantAssign(&pTSBuf->block.tag, tag); memcpy(ptsData->rawBuf + ptsData->len, pData, (size_t)len); // todo check return value -- GitLab