aboutsummaryrefslogtreecommitdiff
path: root/src/datetime-service.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-03-01 20:23:22 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-03-01 20:23:22 -0600
commita8a5a7913ccac164bb8abe4dad8afc9bb736d665 (patch)
tree00bbecc6ff720751cc2feed57fabbf0d73e5af65 /src/datetime-service.c
parent9e8aae213e7a3ced1b6ec8b6b48a9bd69532e709 (diff)
downloadayatana-indicator-datetime-a8a5a7913ccac164bb8abe4dad8afc9bb736d665.tar.gz
ayatana-indicator-datetime-a8a5a7913ccac164bb8abe4dad8afc9bb736d665.tar.bz2
ayatana-indicator-datetime-a8a5a7913ccac164bb8abe4dad8afc9bb736d665.zip
remove unnecessary strdup+free in update_appointment_menu_items()
Diffstat (limited to 'src/datetime-service.c')
-rw-r--r--src/datetime-service.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 438bf5d..a1b9c69 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -892,8 +892,6 @@ update_appointment_menu_items (gpointer user_data)
for (l = sorted_comp_instances; l; l = l->next) {
struct comp_instance *ci = l->data;
ECalComponent *ecalcomp = ci->comp;
- ECalComponentText valuetext;
- gchar *summary;
char right[20];
//const gchar *uri;
DbusmenuMenuitem * item;
@@ -950,12 +948,11 @@ update_appointment_menu_items (gpointer user_data)
// Label text
+ ECalComponentText valuetext;
e_cal_component_get_summary (ecalcomp, &valuetext);
- summary = g_strdup (valuetext.value);
-
- dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_LABEL, summary);
+ const gchar * summary = valuetext.value;
g_debug("Summary: %s", summary);
- g_free (summary);
+ dbusmenu_menuitem_property_set (item, APPOINTMENT_MENUITEM_PROP_LABEL, summary);
gboolean full_day = FALSE;
if (vtype == E_CAL_COMPONENT_EVENT) {