未验证 提交 76ed44f6 编写于 作者: H huili 提交者: GitHub

Merge pull request #5652 from taosdata/fix/TD-3642

[TD-3642]<fix>: fix staging directory resource leak
...@@ -238,9 +238,11 @@ static int32_t dnodeInitStorage() { ...@@ -238,9 +238,11 @@ static int32_t dnodeInitStorage() {
} }
TDIR *tdir = tfsOpendir("vnode_bak/.staging"); TDIR *tdir = tfsOpendir("vnode_bak/.staging");
if (tfsReaddir(tdir) != NULL) { bool stagingNotEmpty = tfsReaddir(tdir) != NULL;
tfsClosedir(tdir);
if (stagingNotEmpty) {
dError("vnode_bak/.staging dir not empty, fix it first."); dError("vnode_bak/.staging dir not empty, fix it first.");
tfsClosedir(tdir);
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册