diff mbox

[06/61] pc: fix file stream leak in multiboot loader.

Message ID 1254305917-14784-7-git-send-email-yamahata@valinux.co.jp
State Superseded
Headers show

Commit Message

Isaku Yamahata Sept. 30, 2009, 10:17 a.m. UTC
fix file stream leak in load_multiboot() in pc.c
There is no reason to keep them open.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/pc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/hw/pc.c b/hw/pc.c
index bc2875e..0d85914 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -754,6 +754,7 @@  static int load_multiboot(void *fw_cfg,
                             initrd_filename, mb_mod_length);
                     exit(1);
                 }
+                fclose(f);
 
                 mb_mod_count++;
                 stl_phys(mb_mod_info + 0, mb_mod_start);