From a8a5a7913ccac164bb8abe4dad8afc9bb736d665 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 1 Mar 2012 20:23:22 -0600 Subject: remove unnecessary strdup+free in update_appointment_menu_items() --- src/datetime-service.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3