cpw.maiku.media_refactor: 917b1904: Free participants properly in purple_med...
maiku at pidgin.im
maiku at pidgin.im
Wed Oct 28 16:12:29 EDT 2009
-----------------------------------------------------------------
Revision: 917b1904577a5f9eef32a98c97aa5cef4514e010
Ancestor: 7f7ce4514908b8cc04afd80cbe193dc611265e5c
Author: maiku at pidgin.im
Date: 2009-10-28T18:16:59
Branch: im.pidgin.cpw.maiku.media_refactor
URL: http://d.pidgin.im/viewmtn/revision/info/917b1904577a5f9eef32a98c97aa5cef4514e010
Modified files:
libpurple/media/media.c
ChangeLog:
Free participants properly in purple_media_end.
-------------- next part --------------
============================================================
--- libpurple/media/media.c f7fc15e73a59f9602b242616a389c80c9a185c79
+++ libpurple/media/media.c b204c8c793a4a57a222f53fbdc9d65551c3668cc
@@ -707,11 +707,19 @@ purple_media_end(PurpleMedia *media,
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);
}
More information about the Commits
mailing list