aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-01 20:03:28 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-03-01 20:03:28 -0600
commit25e9f143eef355cbcb4b3cb7563e28414c4a93a4 (patch)
treea6220010469630d49324c5bc726e43a02652549b
parent37e796d3cb46f8292d85c9c68439a80d3e394960 (diff)
downloadayatana-indicator-datetime-25e9f143eef355cbcb4b3cb7563e28414c4a93a4.tar.gz
ayatana-indicator-datetime-25e9f143eef355cbcb4b3cb7563e28414c4a93a4.tar.bz2
ayatana-indicator-datetime-25e9f143eef355cbcb4b3cb7563e28414c4a93a4.zip
fix memory leaks in day_selected_double_click_cb()
-rw-r--r--src/datetime-service.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 17608b9..3416008 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -420,9 +420,12 @@ day_selected_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, gu
}
static gboolean
-day_selected_double_click_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant *variant, guint timestamp)
+day_selected_double_click_cb (DbusmenuMenuitem * menuitem G_GNUC_UNUSED,
+ gchar * name G_GNUC_UNUSED,
+ GVariant * variant,
+ guint timestamp G_GNUC_UNUSED)
{
- time_t evotime = (time_t)g_variant_get_uint32(variant);
+ const time_t evotime = (time_t)g_variant_get_uint32(variant);
g_debug("Received day-selected-double-click with timestamp: %d -> %s",(int)evotime, ctime(&evotime));
@@ -430,6 +433,9 @@ day_selected_double_click_cb (DbusmenuMenuitem * menuitem, gchar *name, GVariant
gchar *cmd = g_strconcat("evolution calendar:///?startdate=", ad, NULL);
execute_command (cmd);
+
+ g_free (cmd);
+ g_free (ad);
return TRUE;
}