[evolution-data-server/gnome-2-32] Bug #628563 - Use-after-free crash in objects_added_cb() (cherry picked from commit 3aabc763622dcd29
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-32] Bug #628563 - Use-after-free crash in objects_added_cb() (cherry picked from commit 3aabc763622dcd29
- Date: Wed, 11 May 2011 00:45:09 +0000 (UTC)
commit 08f6003736a72c0c50becf76919c55f2c1c9e548
Author: Milan Crha <mcrha redhat com>
Date: Tue Dec 7 13:59:36 2010 +0100
Bug #628563 - Use-after-free crash in objects_added_cb()
(cherry picked from commit 3aabc763622dcd29671293f1640d0b8bdee4cb95)
addressbook/libebook/e-book-view.c | 1 +
calendar/libecal/e-cal-view.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libebook/e-book-view.c b/addressbook/libebook/e-book-view.c
index 2d1bab4..cbf48b4 100644
--- a/addressbook/libebook/e-book-view.c
+++ b/addressbook/libebook/e-book-view.c
@@ -286,6 +286,7 @@ e_book_view_dispose (GObject *object)
if (book_view->priv->gdbus_bookview) {
GError *error = NULL;
+ g_signal_handlers_disconnect_matched (book_view->priv->gdbus_bookview, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, book_view);
e_gdbus_book_view_call_dispose_sync (book_view->priv->gdbus_bookview, NULL, &error);
g_object_unref (book_view->priv->gdbus_bookview);
book_view->priv->gdbus_bookview = NULL;
diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c
index 0470e9c1..a21943c 100644
--- a/calendar/libecal/e-cal-view.c
+++ b/calendar/libecal/e-cal-view.c
@@ -193,8 +193,10 @@ e_cal_view_set_property (GObject *object, guint property_id, const GValue *value
switch (property_id) {
case PROP_VIEW:
- if (priv->gdbus_calview != NULL)
+ if (priv->gdbus_calview != NULL) {
+ g_signal_handlers_disconnect_matched (priv->gdbus_calview, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
g_object_unref (priv->gdbus_calview);
+ }
priv->gdbus_calview = g_object_ref (g_value_get_pointer (value));
g_signal_connect (priv->gdbus_calview, "objects-added", G_CALLBACK (objects_added_cb), view);
@@ -247,8 +249,10 @@ e_cal_view_finalize (GObject *object)
view = E_CAL_VIEW (object);
priv = view->priv;
- if (priv->gdbus_calview != NULL)
+ if (priv->gdbus_calview != NULL) {
+ g_signal_handlers_disconnect_matched (priv->gdbus_calview, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, view);
g_object_unref (priv->gdbus_calview);
+ }
g_object_unref (priv->client);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]