提交 b00b22bb 编写于 作者: H Hongze Cheng

fix file descriptor leakage

上级 640ca45c
......@@ -163,8 +163,8 @@ int tsdbCloseHelperFile(SRWHelper *pHelper, bool hasError) {
if (pHelper->files.lastF.fd > 0) {
if (helperType(pHelper) == TSDB_WRITE_HELPER) {
fsync(pHelper->files.lastF.fd);
close(pHelper->files.lastF.fd);
}
close(pHelper->files.lastF.fd);
pHelper->files.lastF.fd = -1;
}
if (helperType(pHelper) == TSDB_WRITE_HELPER) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册