aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-28 18:37:14 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-28 18:37:14 -0600
commit416e13070bc73824999ad430cb9f264192c76296 (patch)
tree123b5647cd16f19d5bdea64f56c4f0cda1cd9e94 /src
parent793c6fb6550b8a0c95df695aed70dc1777e501df (diff)
downloadayatana-indicator-datetime-416e13070bc73824999ad430cb9f264192c76296.tar.gz
ayatana-indicator-datetime-416e13070bc73824999ad430cb9f264192c76296.tar.bz2
ayatana-indicator-datetime-416e13070bc73824999ad430cb9f264192c76296.zip
fix free-memory-read bug found by valgrind testing
Diffstat (limited to 'src')
-rw-r--r--src/planner-eds.cpp3
1 files changed, 1 insertions, 2 deletions
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)