diff --git a/source/util/src/tpagedbuf.c b/source/util/src/tpagedbuf.c index e8303b563e..ffb11b156d 100644 --- a/source/util/src/tpagedbuf.c +++ b/source/util/src/tpagedbuf.c @@ -547,6 +547,7 @@ void* getBufPage(SDiskbasedBuf* pBuf, int32_t id) { int32_t code = lruListPushFront(pBuf->lruList, *pi); if (TSDB_CODE_SUCCESS != code) { taosMemoryFree((*pi)->pData); + (*pi)->pData = NULL; terrno = code; return NULL; } @@ -557,7 +558,7 @@ void* getBufPage(SDiskbasedBuf* pBuf, int32_t id) { int32_t code = loadPageFromDisk(pBuf, *pi); if (code != 0) { taosMemoryFree((*pi)->pData); - + (*pi)->pData = NULL; terrno = code; return NULL; }