From 105abe6c85d080f369c246e21d4d19c75ffb18c3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 21 May 2015 05:58:00 -0500 Subject: in engine-eds.cpp's get_appointments(), clear the begin_str and end_str variables as soon as we're done with them. --- src/engine-eds.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index 563d9a3..37f72e5 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -135,17 +135,19 @@ public: const auto begin_timet = begin.to_unix(); const auto end_timet = end.to_unix(); + auto begin_str = isodate_from_time_t(begin_timet); auto end_str = isodate_from_time_t(end_timet); auto sexp = g_strdup_printf("(has-alarms-in-range? (make-time \"%s\") (make-time \"%s\"))", begin_str, end_str); + g_clear_pointer(&begin_str, g_free); + g_clear_pointer(&end_str, g_free); + g_debug("%s sexp is %s", G_STRLOC, sexp); e_cal_client_get_object_list_as_comps(client, sexp, m_cancellable, on_object_list_ready, subtask); - g_free(begin_str); - g_free(end_str); g_free(sexp); } } -- cgit v1.2.3