[empathy] Fix memory leaks + minor coding style changes



commit 34f8f2ae58e6dccd3329acac87a842e9afdda0e3
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Fri Apr 17 15:27:11 2009 -0400

    Fix memory leaks + minor coding style changes
---
 src/empathy-new-chatroom-dialog.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index da3112f..1bb034a 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -429,7 +429,7 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist        *room_list,
 	GtkListStore     *store;
 	GtkTreeIter       iter;
 	gchar            *members;
-	gchar            *tool_tip;
+	gchar            *tooltip;
 
 	DEBUG ("New chatroom listed: %s (%s)",
 		empathy_chatroom_get_name (chatroom),
@@ -440,12 +440,11 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist        *room_list,
 	selection = gtk_tree_view_get_selection (view);
 	store = GTK_LIST_STORE (dialog->model);
 	members = g_strdup_printf ("%d", empathy_chatroom_get_members_count (chatroom));
-	tool_tip = g_strdup_printf ("<b>%s</b>\nInvite required: %s\nPassword required: %s\nMembers: %s", 
+	tooltip = g_strdup_printf ("<b>%s</b>\nInvite required: %s\nPassword required: %s\nMembers: %s", 
 			empathy_chatroom_get_name (chatroom),
 			empathy_chatroom_get_invite_only (chatroom) ? _("Yes") : _("No"),
 			empathy_chatroom_get_need_password (chatroom) ? _("Yes") : _("No"),
-			members
-			);
+			members);
 
 	gtk_list_store_append (store, &iter);
 	gtk_list_store_set (store, &iter,
@@ -454,8 +453,11 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist        *room_list,
 			    COL_NAME, empathy_chatroom_get_name (chatroom),
 			    COL_ROOM, empathy_chatroom_get_room (chatroom),
 			    COL_MEMBERS, members,
-			    COL_TOOL_TIP, tool_tip,
+			    COL_TOOL_TIP, tooltip,
 			    -1);
+
+	g_free (members);
+	g_free (tooltip);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]