aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-05-21 05:58:00 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-05-21 05:58:00 -0500
commit105abe6c85d080f369c246e21d4d19c75ffb18c3 (patch)
tree0fec8b7ca8c97dbf418b4c1d99e967c940b452cc
parent9e1f2db6694791beaf0f7340de2f523c95f2551b (diff)
downloadayatana-indicator-datetime-105abe6c85d080f369c246e21d4d19c75ffb18c3.tar.gz
ayatana-indicator-datetime-105abe6c85d080f369c246e21d4d19c75ffb18c3.tar.bz2
ayatana-indicator-datetime-105abe6c85d080f369c246e21d4d19c75ffb18c3.zip
in engine-eds.cpp's get_appointments(), clear the begin_str and end_str variables as soon as we're done with them.
-rw-r--r--src/engine-eds.cpp6
1 files changed, 4 insertions, 2 deletions
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);
}
}