From a82d0fd7cbad9bff96fafae17b2922e1e9d99972 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 28 Jan 2014 18:51:56 -0600 Subject: fix g_date_time_format() leak found by valgrind testing --- src/planner-eds.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3