Patchwork [3/3] s390: Fix memory leak

login
register
mail settings
Submitter Stefan Weil
Date Jan. 22, 2011, 12:02 p.m.
Message ID <1295697766-8851-3-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/79998/
State Accepted
Headers show

Comments

Stefan Weil - Jan. 22, 2011, 12:02 p.m.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/s390-virtio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index f29b624..850422f 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -204,6 +204,7 @@  static void s390_init(ram_addr_t ram_size,
 
         bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
         bios_size = load_image(bios_filename, qemu_get_ram_ptr(ZIPL_LOAD_ADDR));
+        qemu_free(bios_filename);
 
         if ((long)bios_size < 0) {
             hw_error("could not load bootloader '%s'\n", bios_name);