changeset 29600:80bdae3ea957

Free participants properly in purple_media_end.
author maiku@pidgin.im
date Wed, 28 Oct 2009 18:16:59 +0000
parents 78ac6e4d3de9
children bcee1aab1c01
files libpurple/media/media.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media/media.c	Wed Oct 28 18:07:27 2009 +0000
+++ b/libpurple/media/media.c	Wed Oct 28 18:16:59 2009 +0000
@@ -707,11 +707,19 @@
 	for (; participants; participants =
 			g_list_delete_link(participants, participants)) {
 		gchar *participant = participants->data;
-		
+		GList *link = g_list_find_custom(media->priv->participants,
+				participant, (GCompareFunc)strcmp);
+
 		g_signal_emit(media, purple_media_signals[STATE_CHANGED],
 				0, PURPLE_MEDIA_STATE_END,
 				NULL, participant);
 
+		if (link != NULL) {
+			g_free(link->data);
+			media->priv->participants = g_list_delete_link(
+					media->priv->participants, link);
+		}
+
 		g_free(participant);
 	}