Merge pull request #11600 from taosdata/fix/ZhiqiangWang/TD-13756-getline-memory-free-error
fix(os): getline memory free error.
This commit is contained in:
commit
c1d5d3cdbe
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue