mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 05:50:37 +00:00
qdev: Fix memory leak in function set_pci_devfn
Valgrind reported this memory leak which occured very often. Test scenario: qemu-system-i386 (no arguments), only BIOS started, terminate with monitor command (quit). v2: Use error_free instead of g_free (hint from Andreas Färber, thanks). Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
3881725cf0
commit
5c878008dd
@ -834,6 +834,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, void *opaque,
|
||||
|
||||
visit_type_str(v, &str, name, &local_err);
|
||||
if (local_err) {
|
||||
error_free(local_err);
|
||||
return set_int32(obj, v, opaque, name, errp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user