Nothing inside the qemuPrepareNVRAM function relies on @srcFD
being closed early and nothing closes it early. It's okay then to
close it automatically when leaving the function.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 036d95924c..0ba9343b2a 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4463,7 +4463,7 @@ qemuPrepareNVRAM(virQEMUDriver *driver,
{
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
int ret = -1;
- int srcFD = -1;
+ VIR_AUTOCLOSE srcFD = -1;
virDomainLoaderDef *loader = vm->def->os.loader;
const char *master_nvram_path;
struct qemuPrepareNVRAMHelperData data;
@@ -4511,7 +4511,6 @@ qemuPrepareNVRAM(virQEMUDriver *driver,
ret = 0;
cleanup:
- VIR_FORCE_CLOSE(srcFD);
return ret;
}
--
2.34.1