[evolution-ews/wip/mcrha/eds-libical-glib] Do not free objects returned by i_cal_time_get_timezone()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/wip/mcrha/eds-libical-glib] Do not free objects returned by i_cal_time_get_timezone()
- Date: Tue, 9 Apr 2019 09:59:47 +0000 (UTC)
commit 24dd4f6c328b8dde6bbcd26c9369a41f5e173300
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 9 12:01:15 2019 +0200
Do not free objects returned by i_cal_time_get_timezone()
src/calendar/e-cal-backend-ews-utils.c | 12 ++----------
src/calendar/e-cal-backend-ews.c | 3 ---
2 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index c3511311..c6396894 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -1186,13 +1186,13 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
dtstart = e_cal_backend_ews_get_datetime_with_zone (convert_data->timezone_cache,
convert_data->vcalendar, icomp, I_CAL_DTSTART_PROPERTY, i_cal_property_get_dtstart);
tzid_start = dtstart ? i_cal_time_get_timezone (dtstart) : NULL;
if (!tzid_start)
- tzid_start = convert_data->default_zone ? g_object_ref (convert_data->default_zone) : NULL;
+ tzid_start = convert_data->default_zone;
ical_location_start = i_cal_timezone_get_location (tzid_start);
dtend = e_cal_backend_ews_get_datetime_with_zone (convert_data->timezone_cache,
convert_data->vcalendar, icomp, I_CAL_DTEND_PROPERTY, i_cal_property_get_dtend);
tzid_end = dtend ? i_cal_time_get_timezone (dtend) : NULL;
if (!tzid_end)
- tzid_end = convert_data->default_zone ? g_object_ref (convert_data->default_zone) : NULL;
+ tzid_end = convert_data->default_zone;
ical_location_end = i_cal_timezone_get_location (tzid_end);
satisfies = e_ews_connection_satisfies_server_version (convert_data->connection, E_EWS_EXCHANGE_2010);
@@ -1301,8 +1301,6 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
g_clear_object (&dtstart);
g_clear_object (&dtend);
- g_clear_object (&tzid_start);
- g_clear_object (&tzid_end);
g_object_unref (comp);
return TRUE;
@@ -1677,8 +1675,6 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
if (g_strcmp0 (ical_location_start, old_ical_location_start) != 0)
dt_start_changed_timezone_name = TRUE;
-
- g_clear_object (&zone);
}
dtend = e_cal_backend_ews_get_datetime_with_zone (convert_data->timezone_cache,
convert_data->vcalendar, icomp, I_CAL_DTEND_PROPERTY, i_cal_property_get_dtend);
@@ -1695,8 +1691,6 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
if (g_strcmp0 (ical_location_end, old_ical_location_end) != 0)
dt_end_changed_timezone_name = TRUE;
-
- g_clear_object (&zone);
}
satisfies = e_ews_connection_satisfies_server_version (convert_data->connection, E_EWS_EXCHANGE_2010);
@@ -1871,8 +1865,6 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
g_clear_object (&dtend);
g_clear_object (&dtstart_old);
g_clear_object (&dtend_old);
- g_clear_object (&tzid_start);
- g_clear_object (&tzid_end);
return TRUE;
}
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 1f8bff48..84f93160 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3183,8 +3183,6 @@ ecb_ews_send_cancellation_email_sync (ECalBackendEws *cbews,
icaltz = dt ? i_cal_time_get_timezone (dt) : NULL;
if (!icaltz) {
icaltz = ecb_ews_get_timezone_from_icomponent (cbews, vevent);
- if (icaltz)
- g_object_ref (icaltz);
}
if (icaltz) {
@@ -3192,7 +3190,6 @@ ecb_ews_send_cancellation_email_sync (ECalBackendEws *cbews,
if (vtz)
i_cal_component_take_component (vcal, i_cal_component_new_clone (vtz));
g_clear_object (&vtz);
- g_clear_object (&icaltz);
}
i_cal_component_take_component (vcal, vevent);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]