提交 52f4699a 编写于 作者: wafwerar's avatar wafwerar

fix(os): getline memory free error.

上级 63b0e304
...@@ -772,6 +772,9 @@ int64_t taosGetLineFile(TdFilePtr pFile, char **__restrict ptrBuf) { ...@@ -772,6 +772,9 @@ int64_t taosGetLineFile(TdFilePtr pFile, char **__restrict ptrBuf) {
if (pFile == NULL) { if (pFile == NULL) {
return -1; return -1;
} }
if (*ptrBuf != NULL) {
taosMemoryFreeClear(*ptrBuf);
}
assert(pFile->fp != NULL); assert(pFile->fp != NULL);
size_t len = 0; size_t len = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册