mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 19:05:24 +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,6 +2245,7 @@ ebiptablesWriteToTempFile(const char *string) {
|
|||||||
|
|
||||||
err_exit:
|
err_exit:
|
||||||
VIR_FREE(header);
|
VIR_FREE(header);
|
||||||
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
unlink(filename);
|
unlink(filename);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user