Fix leak of two GDateTime
While gcal_date_time_chooser_get_date_time() returns a new reference, gcal_date_chooser_row_get_date() just returns the pointer to the date being edited. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/550>
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
f787afbeab
commit
8120162f23
@@ -546,7 +546,8 @@ static void
|
||||
gcal_schedule_section_apply_to_event (GcalScheduleSection *self,
|
||||
GcalEvent *event)
|
||||
{
|
||||
GDateTime *start_date, *end_date;
|
||||
g_autoptr (GDateTime) start_date = NULL;
|
||||
g_autoptr (GDateTime) end_date = NULL;
|
||||
GcalRecurrenceFrequency freq;
|
||||
gboolean all_day;
|
||||
|
||||
@@ -561,8 +562,8 @@ gcal_schedule_section_apply_to_event (GcalScheduleSection *self,
|
||||
}
|
||||
else
|
||||
{
|
||||
start_date = gcal_date_chooser_row_get_date (self->start_date_row);
|
||||
end_date = gcal_date_chooser_row_get_date (self->end_date_row);
|
||||
start_date = g_date_time_ref (gcal_date_chooser_row_get_date (self->start_date_row));
|
||||
end_date = g_date_time_ref (gcal_date_chooser_row_get_date (self->end_date_row));
|
||||
}
|
||||
|
||||
#ifdef GCAL_ENABLE_TRACE
|
||||
|
||||
Reference in New Issue
Block a user