mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/pc_sysfw: Fix memory leak
Valgrind reported this memory leak which occured a few times. Test scenario: qemu-system-i386 (no arguments), only BIOS started, terminate with monitor command (quit). Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
5c878008dd
commit
9cf1f002d7
1 changed files with 3 additions and 0 deletions
|
@ -85,6 +85,9 @@ static void pc_fw_add_pflash_drv(void)
|
|||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||
|
||||
opts = drive_add(IF_PFLASH, -1, filename, "readonly=on");
|
||||
|
||||
g_free(filename);
|
||||
|
||||
if (opts == NULL) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue