From b6a89f30cf77d57f9834afe03d72a5902d4d3b29 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Wed, 9 May 2012 14:44:03 -0400
Subject: [PATCH] * #10320: calltree: fix memory leak on menu popup

---
 gnome/src/contacts/calltree.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnome/src/contacts/calltree.c b/gnome/src/contacts/calltree.c
index c36d47e69e..7b316e7327 100644
--- a/gnome/src/contacts/calltree.c
+++ b/gnome/src/contacts/calltree.c
@@ -491,13 +491,13 @@ calltree_create(calltab_t* tab, int searchbar_type)
 
         calltree_menu_items = gtk_menu_item_new_with_label(SFL_TRANSFER_CALL);
         g_signal_connect_swapped(calltree_menu_items, "activate",
-                                 G_CALLBACK(menuitem_response), (gpointer) g_strdup(SFL_TRANSFER_CALL));
+                                 G_CALLBACK(menuitem_response), g_strdup(SFL_TRANSFER_CALL));
         gtk_menu_shell_append(GTK_MENU_SHELL(calltree_popupmenu), calltree_menu_items);
         gtk_widget_show(calltree_menu_items);
 
         calltree_menu_items = gtk_menu_item_new_with_label(SFL_CREATE_CONFERENCE);
         g_signal_connect_swapped(calltree_menu_items, "activate",
-                                 G_CALLBACK(menuitem_response), (gpointer) g_strdup(SFL_CREATE_CONFERENCE));
+                                 G_CALLBACK(menuitem_response), g_strdup(SFL_CREATE_CONFERENCE));
         gtk_menu_shell_append(GTK_MENU_SHELL(calltree_popupmenu), calltree_menu_items);
         gtk_widget_show(calltree_menu_items);
     } else if (tab == history_tab) {
@@ -1572,5 +1572,6 @@ static void menuitem_response(gchar *string)
     gtk_widget_show(calltree_menu_items);
 
     DEBUG("%s", string);
+    g_free(string);
 }
 
-- 
GitLab