提交 0058184c 编写于 作者: J Jim Meyering

ebiptablesWriteToTempFile: don't close a negative file descriptor

* src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesWriteToTempFile):
Skip the close if "fd" is negative.
上级 31e29fe5
...@@ -2245,7 +2245,8 @@ ebiptablesWriteToTempFile(const char *string) { ...@@ -2245,7 +2245,8 @@ ebiptablesWriteToTempFile(const char *string) {
err_exit: err_exit:
VIR_FREE(header); VIR_FREE(header);
close(fd); if (fd >= 0)
close(fd);
unlink(filename); unlink(filename);
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册