fix(os): getline memory free error.

This commit is contained in:
afwerar 2022-04-18 17:34:10 +08:00
parent 63b0e304d4
commit 52f4699a52
1 changed files with 3 additions and 0 deletions

View File

@ -772,6 +772,9 @@ int64_t taosGetLineFile(TdFilePtr pFile, char **__restrict ptrBuf) {
if (pFile == NULL) {
return -1;
}
if (*ptrBuf != NULL) {
taosMemoryFreeClear(*ptrBuf);
}
assert(pFile->fp != NULL);
size_t len = 0;