[empathy] tp-chat: copy the rename message



commit 91f13bff713e208272ad93d36c2faf0737cdd32c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Nov 18 14:06:15 2009 +0000

    tp-chat: copy the rename message

 libempathy/empathy-tp-chat.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 1bcf371..f1c455e 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -950,7 +950,7 @@ typedef struct
 {
     TpHandle old_handle;
     guint reason;
-    const gchar *message;
+    gchar *message;
 } ContactRenameData;
 
 static ContactRenameData *
@@ -961,7 +961,7 @@ contact_rename_data_new (TpHandle handle,
 	ContactRenameData *data = g_new (ContactRenameData, 1);
 	data->old_handle = handle;
 	data->reason = reason;
-	data->message = message;
+	data->message = g_strdup (message);
 
 	return data;
 }
@@ -969,7 +969,8 @@ contact_rename_data_new (TpHandle handle,
 static void
 contact_rename_data_free (ContactRenameData* data)
 {
-    g_free (data);
+	g_free (data->message);
+	g_free (data);
 }
 
 static void



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