Free MutterWindow description string in finalize() not dispose()
We were freeing the description string in dispose and not setting it to NULL, thus leaving around a dangling pointer for the duration of the disposal. This commit moves the free into the finalize vfuction, where it belongs.
This commit is contained in:
parent
15376957f7
commit
84059f1faa
@ -415,14 +415,17 @@ mutter_window_dispose (GObject *object)
|
||||
info->windows = g_list_remove (info->windows, (gconstpointer) self);
|
||||
g_hash_table_remove (info->windows_by_xid, (gpointer) priv->xwindow);
|
||||
|
||||
g_free (priv->desc);
|
||||
|
||||
G_OBJECT_CLASS (mutter_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_window_finalize (GObject *object)
|
||||
{
|
||||
MutterWindow *self = MUTTER_WINDOW (object);
|
||||
MutterWindowPrivate *priv = self->priv;
|
||||
|
||||
g_free (priv->desc);
|
||||
|
||||
G_OBJECT_CLASS (mutter_window_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user