# HG changeset patch # User Matti Hamalainen # Date 1189803345 -10800 # Node ID 9cc39a38fdfe531023199d897c257cf9695eef31 # Parent fb5bc40d0b867239468a3723f282e16225e14bc3 Oops, static field values were not being freed, fixed. diff -r fb5bc40d0b86 -r 9cc39a38fdfe src/audacious/tuple.c --- a/src/audacious/tuple.c Fri Sep 14 08:07:56 2007 +0300 +++ b/src/audacious/tuple.c Fri Sep 14 23:55:45 2007 +0300 @@ -94,9 +94,21 @@ tuple_destroy(gpointer data) { Tuple *tuple = (Tuple *) data; + gint i; TUPLE_LOCK_WRITE(); mowgli_dictionary_destroy(tuple->dict, tuple_value_destroy, NULL); + + for (i = 0; i < FIELD_LAST; i++) + if (tuple->values[i]) { + TupleValue *value = tuple->values[i]; + + if (value->type == TUPLE_STRING) + g_free(value->value.string); + + mowgli_heap_free(tuple_value_heap, value); + } + mowgli_heap_free(tuple_heap, tuple); TUPLE_UNLOCK_WRITE(); }