提交 3a83e552 编写于 作者: N neverxie

[components][pipe] Fix 'pipe' command close bug when open failed.

上级 2ec54bab
......@@ -541,7 +541,7 @@ int pipe(int fildes[2])
fildes[1] = open(dev_name, O_WRONLY, 0);
if (fildes[1] < 0)
{
close(fildes[1]);
close(fildes[0]);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册