From dc70d18040e5364310325f5463e237ae484a981f Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Thu, 1 May 2014 23:16:41 +0200 Subject: [PATCH] Close opened files --- hw/xbox/chihiro.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xbox/chihiro.c b/hw/xbox/chihiro.c index 9ee7285186..4ff0affe61 100644 --- a/hw/xbox/chihiro.c +++ b/hw/xbox/chihiro.c @@ -173,6 +173,7 @@ static void chihiro_ide_interface_init(const char *rom_file, assert(fd != -1); rc = read(fd, memory_region_get_ram_ptr(rom), rom_size); assert(rc == rom_size); + close(fd); } @@ -186,6 +187,7 @@ static void chihiro_ide_interface_init(const char *rom_file, assert(fd != -1); rc = read(fd, memory_region_get_ram_ptr(rom), filesystem_size); assert(rc == filesystem_size); + close(fd); } /* create the device */ @@ -280,4 +282,4 @@ static QEMUMachine chihiro_machine = { static void chihiro_machine_init(void) { qemu_register_machine(&chihiro_machine); } -machine_init(chihiro_machine_init); \ No newline at end of file +machine_init(chihiro_machine_init);