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>
This commit is contained in:
Gonglei 2015-03-05 10:58:32 +08:00 committed by Michael Tokarev
parent 293811f6c1
commit 6e05a12f8f
4 changed files with 6 additions and 2 deletions

View file

@ -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);