From 416e13070bc73824999ad430cb9f264192c76296 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 28 Jan 2014 18:37:14 -0600 Subject: fix free-memory-read bug found by valgrind testing --- src/planner-eds.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/planner-eds.cpp') diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp index 54332ce..db5d1ba 100644 --- a/src/planner-eds.cpp +++ b/src/planner-eds.cpp @@ -214,7 +214,7 @@ private: void rebuildNow() { - auto calendar_date = m_owner.time.get().get(); + const auto calendar_date = m_owner.time.get().get(); GDateTime* begin; GDateTime* end; int y, m, d; @@ -245,7 +245,6 @@ private: } g_clear_pointer(&begin, g_date_time_unref); g_clear_pointer(&end, g_date_time_unref); - g_clear_pointer(&calendar_date, g_date_time_unref); } void getAppointments(GDateTime* begin_dt, GDateTime* end_dt, appointment_func func) -- cgit v1.2.3