gnome-initial-setup/0001-password-Clean-up-signal-handler-in-dispose.patch
Matthias Clasen bb41d38fea Fix 1116478
2014-07-24 17:27:17 -04:00

50 lines
1.8 KiB
Diff

From 03c1e4338e7bb58c57370c0e32c937207494fa8d Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Thu, 24 Jul 2014 17:17:40 -0400
Subject: [PATCH] password: Clean up signal handler in dispose
This is the only place where we connect to a driver signal,
and we never clean up the handler, so it is left dangling
when the pages get reconstructed (since the driver object
survives that). This might explain the mysterious memory
corruption crashes that various people have been seeing,
which usually involved this signal handler.
https://bugzilla.gnome.org/show_bug.cgi?id=733555
https://bugzilla.gnome.org/show_bug.cgi?id=732525
---
gnome-initial-setup/pages/password/gis-password-page.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnome-initial-setup/pages/password/gis-password-page.c b/gnome-initial-setup/pages/password/gis-password-page.c
index 20144fd..7ab9662 100644
--- a/gnome-initial-setup/pages/password/gis-password-page.c
+++ b/gnome-initial-setup/pages/password/gis-password-page.c
@@ -238,6 +238,15 @@ gis_password_page_constructed (GObject *object)
}
static void
+gis_password_page_dispose (GObject *object)
+{
+ g_signal_handlers_disconnect_by_func (GIS_PAGE (object)->driver,
+ username_changed, object);
+
+ G_OBJECT_CLASS (gis_password_page_parent_class)->dispose (object);
+}
+
+static void
gis_password_page_locale_changed (GisPage *page)
{
gis_page_set_title (GIS_PAGE (page), _("Password"));
@@ -261,6 +270,7 @@ gis_password_page_class_init (GisPasswordPageClass *klass)
page_class->locale_changed = gis_password_page_locale_changed;
page_class->save_data = gis_password_page_save_data;
object_class->constructed = gis_password_page_constructed;
+ object_class->dispose = gis_password_page_dispose;
}
static void
--
2.0.1