Skip to content
Snippets Groups Projects
Commit fdc6e168 authored by Daniil Tatianin's avatar Daniil Tatianin Committed by Paolo Bonzini
Browse files

chardev/wctable: don't free the instance in wctablet_chr_finalize


Object is supposed to be freed by invoking obj->free, and not
obj->instance_finalize. This would lead to use-after-free followed by
double free in object_unref/object_finalize.

Signed-off-by: default avatarDaniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20211117142349.836279-1-d-tatianin@yandex-team.ru>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent fbab8cc2
No related branches found
No related tags found
No related merge requests found
......@@ -320,7 +320,6 @@ static void wctablet_chr_finalize(Object *obj)
TabletChardev *tablet = WCTABLET_CHARDEV(obj);
qemu_input_handler_unregister(tablet->hs);
g_free(tablet);
}
static void wctablet_chr_open(Chardev *chr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment