[evolution-ews] Bug #668555 Crash in ews_cal_sync_items_ready_cb
- From: Punit Jain <jpunit src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #668555 Crash in ews_cal_sync_items_ready_cb
- Date: Mon, 26 Mar 2012 11:53:20 +0000 (UTC)
commit 54d5b1fdb79ae32db59d40a0241b47ba172ad7e6
Author: Punit Jain <jpunit suse com>
Date: Mon Mar 26 17:22:53 2012 +0530
Bug #668555 Crash in ews_cal_sync_items_ready_cb
src/calendar/e-cal-backend-ews.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 981eef0..160fd1a 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3196,7 +3196,7 @@ ews_cal_get_items_ready_cb (GObject *obj,
const EwsId *item_id = e_ews_item_get_id (l->data);
sub_sync_data = g_new0 (struct _ews_sync_data, 1);
- sub_sync_data->cbews = sync_data->cbews;
+ sub_sync_data->cbews = g_object_ref (sync_data->cbews);
sub_sync_data->master_uid = g_strdup (item_id->id);
e_ews_connection_get_items_start (g_object_ref (cnc), EWS_PRIORITY_MEDIUM,
@@ -3230,9 +3230,10 @@ ews_cal_get_items_ready_cb (GObject *obj,
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
exit:
+ g_object_unref (sync_data->cbews);
g_free (sync_data->master_uid);
g_free (sync_data->sync_state);
g_free (sync_data);
@@ -3274,6 +3275,7 @@ ews_cal_sync_items_ready_cb (GObject *obj,
PRIV_UNLOCK (priv);
g_clear_error (&error);
+ g_object_unref (cbews);
return;
}
@@ -3319,14 +3321,14 @@ ews_cal_sync_items_ready_cb (GObject *obj,
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
g_free (sync_state);
goto exit;
}
if (cal_item_ids || task_item_ids) {
sync_data = g_new0 (struct _ews_sync_data, 1);
- sync_data->cbews = cbews;
+ sync_data->cbews = g_object_ref (cbews);
sync_data->sync_state = sync_state;
sync_data->sync_pending = !includes_last_item;
}
@@ -3369,6 +3371,8 @@ exit:
g_slist_free (items_updated);
if (items_deleted)
g_slist_free (items_deleted);
+
+ g_object_unref (cbews);
}
static gboolean
@@ -3392,7 +3396,7 @@ ews_start_sync (gpointer data)
"IdOnly", NULL,
EWS_MAX_FETCH_COUNT,
ews_cal_sync_items_ready_cb,
- NULL, cbews);
+ NULL, g_object_ref (cbews));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]