From fdc6e168181d06391711171b7c409b34f2981ced Mon Sep 17 00:00:00 2001 From: Daniil Tatianin Date: Wed, 17 Nov 2021 17:23:49 +0300 Subject: chardev/wctable: don't free the instance in wctablet_chr_finalize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Daniil Tatianin Reviewed-by: Marc-André Lureau Message-Id: <20211117142349.836279-1-d-tatianin@yandex-team.ru> Signed-off-by: Paolo Bonzini --- chardev/wctablet.c | 1 - 1 file changed, 1 deletion(-) (limited to 'chardev') diff --git a/chardev/wctablet.c b/chardev/wctablet.c index 95e005f..e8b292c 100644 --- a/chardev/wctablet.c +++ b/chardev/wctablet.c @@ -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, -- cgit v1.1