pidgin.next.minor: d2b411c3: The key and value need to be g_stdup()'d...

evands at pidgin.im evands at pidgin.im
Wed Apr 30 17:17:23 EDT 2008


-----------------------------------------------------------------
Revision: d2b411c3bdf299282e63ddaf7dd798f86b2993c8
Ancestor: abf566537d9a9a96a8c007bc3b8eaa608d271a8c
Author: evands at pidgin.im
Date: 2008-04-30T21:09:59
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/d2b411c3bdf299282e63ddaf7dd798f86b2993c8

Modified files:
        libpurple/protocols/jabber/chat.c

ChangeLog: 

The key and value need to be g_stdup()'d before adding to the hash table
since g_free will be called on them when it is destroyed. Thanks to Mark
for catching this.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/chat.c	8ca8027d67f3c9c00cb203e44a0c9ac9baef086d
+++ libpurple/protocols/jabber/chat.c	2f024925f21f3337781add643db398283cb6725f
@@ -201,7 +201,7 @@ static void insert_in_hash_table(gpointe
 static void insert_in_hash_table(gpointer key, gpointer value, gpointer user_data)
 {
 	GHashTable *hash_table = (GHashTable *)user_data;
-	g_hash_table_insert(hash_table, key, value);
+	g_hash_table_insert(hash_table, g_strdup(key), g_strdup(value));
 }
 
 void jabber_chat_join(PurpleConnection *gc, GHashTable *data)


More information about the Commits mailing list