88d15a78: g_hash_table_ref() / g_hash_table_unref(..

Mark Doliner mark at
Wed Apr 30 14:47:53 EDT 2008

On Wed, 30 Apr 2008 10:10:41 -0400 (EDT), evands wrote
> -----------------------------------------------------------------
> Revision: 88d15a78416cbab803d3b60b47292506e763d5d0
> Ancestor: 6b848e03c7f6c7c392579517011deded648dedec
> Author: evands at
> Date: 2008-04-30T14:06:03
> Branch:
> URL:
> Modified files:
>         libpurple/protocols/jabber/chat.c
> ChangeLog:
> g_hash_table_ref() / g_hash_table_unref() were added in too recent a 
> glib version per Mark. Copy data to chat->components rather than 
> using those.

I haven't tested this or dug around very much, but wouldn't this crash?  It
looks like you're not actually copying the data but instead just copying
references to the strings in the original hash table, which are freed by
whoever called serv_join_chat().  I'm also wondering if it would be better if
the core gave the hash table to the PRPL and it was the PRPLs responsibility
to free it.  But I guess that might require an API change (or we could just
live with the fact that 3rd party PRPLs would leak memory until they started
freeing the hash table).


More information about the Devel mailing list