diff -r e6d0a4ad57df -r 80801a34a246 src/status.c --- a/src/status.c Sat Jan 15 16:53:55 2005 +0000 +++ b/src/status.c Mon Jan 17 00:33:30 2005 +0000 @@ -1663,7 +1663,7 @@ primitive_scores[index] = GPOINTER_TO_INT(value); } -guint +static guint gaim_buddy_presences_hash(gconstpointer key) { const GaimStatusBuddyKey *me = key; @@ -1677,7 +1677,7 @@ return ret; } -gboolean +static gboolean gaim_buddy_presences_equal(gconstpointer a, gconstpointer b) { GaimStatusBuddyKey *key_a = (GaimStatusBuddyKey *)a; @@ -1690,6 +1690,14 @@ return FALSE; } +static void +gaim_buddy_presences_key_free(gpointer a) +{ + GaimStatusBuddyKey *key = (GaimStatusBuddyKey *)a; + g_free(key->name); + g_free(key); +} + void * gaim_status_get_handle(void) { static int handle; @@ -1737,8 +1745,9 @@ score_pref_changed_cb, GINT_TO_POINTER(SCORE_IDLE)); - buddy_presences = g_hash_table_new(gaim_buddy_presences_hash, - gaim_buddy_presences_equal); + buddy_presences = g_hash_table_new_full(gaim_buddy_presences_hash, + gaim_buddy_presences_equal, + gaim_buddy_presences_key_free, NULL); } void