提交 82fad6c3 编写于 作者: L Leon Chan

fix: rollback resources when opendir failed

close: #I3Y577
Signed-off-by: NLeon Chan <chenwei26@huawei.com>
上级 59225cb6
......@@ -524,6 +524,7 @@ DIR *LfsOpendir(const char *dirName)
ret = lfs_dir_open(&(fileOpInfo->lfsInfo), (lfs_dir_t *)(&(dirInfo->dir)), dirName);
if (ret != 0) {
FreeDirInfo(dirName);
errno = LittlefsErrno(ret);
goto errout;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册