Skip to content

Commit 4658dfc

Browse files
d-tatianinmdroth
authored andcommitted
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: Daniil Tatianin <[email protected]> Reviewed-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> (cherry picked from commit fdc6e16) Signed-off-by: Michael Roth <[email protected]>
1 parent 2b2eb34 commit 4658dfc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

chardev/wctablet.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ static void wctablet_chr_finalize(Object *obj)
320320
TabletChardev *tablet = WCTABLET_CHARDEV(obj);
321321

322322
qemu_input_handler_unregister(tablet->hs);
323-
g_free(tablet);
324323
}
325324

326325
static void wctablet_chr_open(Chardev *chr,

0 commit comments

Comments
 (0)