mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
ebiptablesWriteToTempFile: don't close a negative file descriptor
* src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesWriteToTempFile): Skip the close if "fd" is negative.
This commit is contained in:
parent
31e29fe524
commit
0058184c4e
@ -2245,7 +2245,8 @@ ebiptablesWriteToTempFile(const char *string) {
|
||||
|
||||
err_exit:
|
||||
VIR_FREE(header);
|
||||
close(fd);
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
unlink(filename);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user