aboutsummaryrefslogtreecommitdiff
path: root/src/planner-eds.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-28 18:51:56 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-28 18:51:56 -0600
commita82d0fd7cbad9bff96fafae17b2922e1e9d99972 (patch)
tree080b536d9c8aa2a09b2c3f47547ddb948225bc0c /src/planner-eds.cpp
parentae3ac73a1a8e5a8da7aa0e4f3a3031ba0ec2f192 (diff)
downloadayatana-indicator-datetime-a82d0fd7cbad9bff96fafae17b2922e1e9d99972.tar.gz
ayatana-indicator-datetime-a82d0fd7cbad9bff96fafae17b2922e1e9d99972.tar.bz2
ayatana-indicator-datetime-a82d0fd7cbad9bff96fafae17b2922e1e9d99972.zip
fix g_date_time_format() leak found by valgrind testing
Diffstat (limited to 'src/planner-eds.cpp')
-rw-r--r--src/planner-eds.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp
index df62360..98cfe0a 100644
--- a/src/planner-eds.cpp
+++ b/src/planner-eds.cpp
@@ -251,8 +251,12 @@ private:
{
const auto begin = g_date_time_to_unix(begin_dt);
const auto end = g_date_time_to_unix(end_dt);
- g_debug("getting all appointments from [%s ... %s]", g_date_time_format(begin_dt, "%F %T"),
- g_date_time_format(end_dt, "%F %T"));
+
+ auto begin_str = g_date_time_format(begin_dt, "%F %T");
+ auto end_str = g_date_time_format(end_dt, "%F %T");
+ g_debug("getting all appointments from [%s ... %s]", begin_str, end_str);
+ g_free(begin_str);
+ g_free(end_str);
/**
*** init the default timezone