[evolution] Calendar: Fix couple memory leaks



commit 63ea3141db416f1065aca2f7faf060cfa28b14fd
Author: Milan Crha <mcrha redhat com>
Date:   Thu Mar 11 11:56:22 2021 +0100

    Calendar: Fix couple memory leaks

 src/calendar/gui/e-cal-model.c | 1 +
 src/calendar/gui/itip-utils.c  | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/src/calendar/gui/e-cal-model.c b/src/calendar/gui/e-cal-model.c
index 56cb209c72..776dce767c 100644
--- a/src/calendar/gui/e-cal-model.c
+++ b/src/calendar/gui/e-cal-model.c
@@ -4077,6 +4077,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data,
                         * just make start_time = end_time so that end_time
                         * will be a valid date
                         */
+                       g_clear_object (&end_time);
                        end_time = i_cal_time_clone (start_time);
                        i_cal_time_adjust (end_time, 1, 0, 0, 0);
                        i_cal_component_set_dtend (comp_data->icalcomp, end_time);
diff --git a/src/calendar/gui/itip-utils.c b/src/calendar/gui/itip-utils.c
index b26b64ac78..48ed8e5a3a 100644
--- a/src/calendar/gui/itip-utils.c
+++ b/src/calendar/gui/itip-utils.c
@@ -562,6 +562,7 @@ itip_attendee_is_user (ESourceRegistry *registry,
                g_free (address);
        }
 
+       g_slist_free_full (attendees, e_cal_component_attendee_free);
        g_list_free_full (list, g_object_unref);
 
        return FALSE;


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