提交 aa7d50ce 编写于 作者: W Wen Congyang 提交者: Cole Robinson

avoid fd leak

virCommandRunAsync() will set errfd if it succeed. We should
close it if virFDStreamOpenInternal() fails.
(cherry picked from commit 655cffa0)
上级 ab73fe59
......@@ -668,6 +668,7 @@ error:
VIR_FORCE_CLOSE(fds[0]);
VIR_FORCE_CLOSE(fds[1]);
VIR_FORCE_CLOSE(fd);
VIR_FORCE_CLOSE(errfd);
if (oflags & O_CREAT)
unlink(path);
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册