Close opened files

This commit is contained in:
Jannik Vogel 2014-05-01 23:16:41 +02:00 committed by espes
parent 2c4571a3cd
commit dc70d18040
1 changed files with 3 additions and 1 deletions

View File

@ -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);
machine_init(chihiro_machine_init);