diff options
author | Gonglei <arei.gonglei@huawei.com> | 2015-03-05 10:58:32 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2015-03-19 11:11:55 +0300 |
commit | 6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177 (patch) | |
tree | 32b8b7e4255cb5efdb4c8ab354efd02a19cc3c55 /hw/arm/virt.c | |
parent | 293811f6c1630e3b37aa9d214c6596ce854ab2c7 (diff) | |
download | qemu-6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177.zip qemu-6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177.tar.gz qemu-6e05a12f8f7f32a3fecbeb0c572d549a5f6e9177.tar.bz2 |
arm: fix memory leak
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/arm/virt.c')
-rw-r--r-- | hw/arm/virt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9072bc2..b2eaea8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -552,7 +552,7 @@ static void create_flash(const VirtBoardInfo *vbi) char *nodename; if (bios_name) { - const char *fn; + char *fn; if (drive_get(IF_PFLASH, 0, 0)) { error_report("The contents of the first flash device may be " @@ -565,6 +565,7 @@ static void create_flash(const VirtBoardInfo *vbi) error_report("Could not load ROM image '%s'", bios_name); exit(1); } + g_free(fn); } create_one_flash("virt.flash0", flashbase, flashsize); |