Correctly chain up the finalize implementation.
2008-09-29 Emmanuele Bassi <ebassi@linux.intel.com> * gdk/x11/gdkinput.c: (gdk_device_class_init), (gdk_device_finalize): Correctly chain up the finalize implementation. svn path=/trunk/; revision=21542
This commit is contained in:
committed by
Emmanuele Bassi
parent
b29d3d4082
commit
2b23dc99e7
@ -1,3 +1,9 @@
|
||||
2008-09-29 Emmanuele Bassi <ebassi@linux.intel.com>
|
||||
|
||||
* gdk/x11/gdkinput.c:
|
||||
(gdk_device_class_init), (gdk_device_finalize): Correctly chain
|
||||
up the finalize implementation.
|
||||
|
||||
2008-09-29 Richard Hult <richard@imendio.com>
|
||||
|
||||
Bug 554141 – uninitialized data use/free in gtkclipboard-quartz.c
|
||||
|
||||
@ -66,6 +66,8 @@ _gdk_init_input_core (GdkDisplay *display)
|
||||
static void gdk_device_class_init (GdkDeviceClass *klass);
|
||||
static void gdk_device_finalize (GObject *object);
|
||||
|
||||
static gpointer gdk_device_parent_class = NULL;
|
||||
|
||||
GType
|
||||
gdk_device_get_type (void)
|
||||
{
|
||||
@ -99,6 +101,8 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gdk_device_parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gdk_device_finalize;
|
||||
}
|
||||
|
||||
@ -108,17 +112,20 @@ gdk_device_finalize (GObject *object)
|
||||
GdkDevicePrivate *gdkdev = (GdkDevicePrivate *)GDK_DEVICE(object);
|
||||
|
||||
if (!GDK_IS_CORE (gdkdev))
|
||||
{
|
||||
{
|
||||
#ifndef XINPUT_NONE
|
||||
if (gdkdev->xdevice)
|
||||
XCloseDevice (GDK_DISPLAY_XDISPLAY(gdkdev->display), gdkdev->xdevice);
|
||||
g_free (gdkdev->axes);
|
||||
if (gdkdev->xdevice)
|
||||
XCloseDevice (GDK_DISPLAY_XDISPLAY(gdkdev->display), gdkdev->xdevice);
|
||||
|
||||
g_free (gdkdev->axes);
|
||||
#endif /* !XINPUT_NONE */
|
||||
|
||||
g_free (gdkdev->info.name);
|
||||
g_free (gdkdev->info.keys);
|
||||
g_free (gdkdev->info.axes);
|
||||
}
|
||||
g_free (gdkdev->info.name);
|
||||
g_free (gdkdev->info.keys);
|
||||
g_free (gdkdev->info.axes);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gdk_device_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user