Error set by error_set is dynamically allocated and needs to be cleared properly later. graphic_console_init neither needs error descriptions nor frees them. Pass NULL instead of actual pointers to avoid unnecessary memory allocations.
Signed-off-by: Kirill Batuzov <batuz...@ispras.ru> --- ui/console.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui/console.c b/ui/console.c index e057755..438b6bd 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1590,7 +1590,6 @@ QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, const GraphicHwOps *hw_ops, void *opaque) { - Error *local_err = NULL; int width = 640; int height = 480; QemuConsole *s; @@ -1602,10 +1601,8 @@ QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, s->hw_ops = hw_ops; s->hw = opaque; if (dev) { - object_property_set_link(OBJECT(s), OBJECT(dev), - "device", &local_err); - object_property_set_int(OBJECT(s), head, - "head", &local_err); + object_property_set_link(OBJECT(s), OBJECT(dev), "device", NULL); + object_property_set_int(OBJECT(s), head, "head", NULL); } s->surface = qemu_create_displaysurface(width, height); -- 1.7.10.4