提交 6759354d 编写于 作者: J JinuineLi

fix: memory leak

memory allocated by calloc is never released when error returned
Signed-off-by: NJinuineLi <lihongjin1@huawei.com>
Change-Id: I593bad4a833a225d2f91dc036a23e4fffdc6fd6d
上级 07102a73
......@@ -129,6 +129,7 @@ DIR *opendir(const char *path)
}
if (ret < 0)
{
free(dir);
goto errout_with_count;
}
dir->fd_status = DIRENT_MAGIC;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册