[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_fina

From: Daniil Tatianin
Subject: [PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_finalize
Date: Wed, 17 Nov 2021 17:23:49 +0300

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 <d-tatianin@yandex-team.ru>
 chardev/wctablet.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/chardev/wctablet.c b/chardev/wctablet.c
index e9cb7ca710..fa3c9be04e 100644
--- a/chardev/wctablet.c
+++ b/chardev/wctablet.c
@@ -318,7 +318,6 @@ static void wctablet_chr_finalize(Object *obj)
     TabletChardev *tablet = WCTABLET_CHARDEV(obj);
-    g_free(tablet);
 static void wctablet_chr_open(Chardev *chr,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]