background: Fix memory leak

https://bugzilla.gnome.org/show_bug.cgi?id=698710
This commit is contained in:
Pavel Vasin 2013-04-23 13:02:04 +04:00 committed by Rui Matos
parent 51d98be1f2
commit 1c06f0dc09

View File

@ -472,6 +472,17 @@ meta_background_dispose (GObject *object)
G_OBJECT_CLASS (meta_background_parent_class)->dispose (object); G_OBJECT_CLASS (meta_background_parent_class)->dispose (object);
} }
static void
meta_background_finalize (GObject *object)
{
MetaBackground *self = META_BACKGROUND (object);
MetaBackgroundPrivate *priv = self->priv;
g_free (priv->filename);
G_OBJECT_CLASS (meta_background_parent_class)->finalize (object);
}
static void static void
ensure_pipeline (MetaBackground *self) ensure_pipeline (MetaBackground *self)
{ {
@ -643,6 +654,7 @@ meta_background_class_init (MetaBackgroundClass *klass)
g_type_class_add_private (klass, sizeof (MetaBackgroundPrivate)); g_type_class_add_private (klass, sizeof (MetaBackgroundPrivate));
object_class->dispose = meta_background_dispose; object_class->dispose = meta_background_dispose;
object_class->finalize = meta_background_finalize;
object_class->set_property = meta_background_set_property; object_class->set_property = meta_background_set_property;
object_class->get_property = meta_background_get_property; object_class->get_property = meta_background_get_property;