changeset 24859:f27910934e69

Fix a leak "KuSh" discovered using "cppcheck". Fixes #7859.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 22 Dec 2008 16:22:08 +0000
parents 09521734fe40
children 5d693af3e9e2
files libpurple/protocols/qq/group_internal.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/qq/group_internal.c	Mon Dec 22 16:17:28 2008 +0000
+++ b/libpurple/protocols/qq/group_internal.c	Mon Dec 22 16:22:08 2008 +0000
@@ -30,7 +30,7 @@
 #include "group_internal.h"
 #include "utils.h"
 
-static qq_room_data *room_data_new(guint32 id, guint32 ext_id, gchar *title)
+static qq_room_data *room_data_new(guint32 id, guint32 ext_id, const gchar *title)
 {
 	qq_room_data *rmd;
 
@@ -62,9 +62,9 @@
 
 	value = g_hash_table_lookup(data, QQ_ROOM_KEY_INTERNAL_ID);
 	id = value ? strtoul(value, NULL, 10) : 0;
-	value= g_hash_table_lookup(data, QQ_ROOM_KEY_EXTERNAL_ID);
+	value = g_hash_table_lookup(data, QQ_ROOM_KEY_EXTERNAL_ID);
 	ext_id = value ? strtoul(value, NULL, 10) : 0;
-	value = g_strdup(g_hash_table_lookup(data, QQ_ROOM_KEY_TITLE_UTF8));
+	value = g_hash_table_lookup(data, QQ_ROOM_KEY_TITLE_UTF8);
 
 	rmd = room_data_new(id, ext_id, value);
 	rmd->my_role = QQ_ROOM_ROLE_YES;