From 1cfb58e3c433667a2ecdff0f343a2844b6039541 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 28 Feb 2025 18:47:26 -0600 Subject: [PATCH] Fix leak of date_time_end It's replaced by this line: date_time_end = all_day ? g_date_time_add_days (date_time_end, -1) : date_time_end; so we need to be able to free that. Part-of: --- src/gui/event-editor/gcal-schedule-section.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/event-editor/gcal-schedule-section.c b/src/gui/event-editor/gcal-schedule-section.c index 49e000c5..b370e0eb 100644 --- a/src/gui/event-editor/gcal-schedule-section.c +++ b/src/gui/event-editor/gcal-schedule-section.c @@ -447,7 +447,7 @@ gcal_schedule_section_set_event (GcalEventEditorSection *section, { GcalScheduleSection *self; GDateTime* date_time_start = NULL; - GDateTime* date_time_end = NULL; + g_autoptr (GDateTime) date_time_end = NULL; GcalRecurrenceLimitType limit_type; GcalRecurrenceFrequency frequency; gboolean all_day; @@ -476,7 +476,7 @@ gcal_schedule_section_set_event (GcalEventEditorSection *section, /* retrieve start and end date-times */ date_time_start = values->date_start; - date_time_end = values->date_end; + date_time_end = g_date_time_ref (values->date_end); /* * This is subtracting what has been added in action_button_clicked (). * See bug 769300.