[evolution-ews] Fix issues found during 'make check'



commit 3e27dfadb357e94cf458451beb5bb8c12a33ace0
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 22 16:07:44 2019 +0200

    Fix issues found during 'make check'
    
    Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/49

 src/calendar/e-cal-backend-ews-utils.c | 4 +++-
 src/server/e-ews-connection.c          | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index e7f410b3..5f68ec5e 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -2249,7 +2249,7 @@ e_cal_backend_ews_get_datetime_with_zone (ETimezoneCache *timezone_cache,
 
        dt = get_func (prop);
 
-       if (dt || !i_cal_time_is_valid_time (dt) ||
+       if (!dt || !i_cal_time_is_valid_time (dt) ||
            i_cal_time_is_null_time (dt)) {
                g_clear_object (&dt);
                g_object_unref (prop);
@@ -2290,6 +2290,8 @@ e_cal_backend_ews_get_datetime_with_zone (ETimezoneCache *timezone_cache,
 
        if (!zone)
                zone = vcalendar ? i_cal_component_get_timezone (vcalendar, tzid) : NULL;
+       else
+               g_object_ref (zone);
 
        i_cal_time_set_timezone (dt, zone);
 
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index c3f06488..df626eb0 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -230,6 +230,7 @@ e_ews_calendar_to_free (EEwsCalendarTo *to) {
        if (to != NULL) {
                g_free (to->kind);
                g_free (to->value);
+               g_free (to);
        }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]