pidgin.vv: 114f60ba: Free Farsight objects better.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Mon Dec 15 05:50:34 EST 2008


-----------------------------------------------------------------
Revision: 114f60ba0d193d3f5aa59b3dbfb7bfbb01cd3899
Ancestor: 293dcd872317589363127f6756504ae07c8d2a95
Author: maiku at soc.pidgin.im
Date: 2008-12-15T09:55:25
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/114f60ba0d193d3f5aa59b3dbfb7bfbb01cd3899

Modified files:
        libpurple/media.c

ChangeLog: 

Free Farsight objects better.

-------------- next part --------------
============================================================
--- libpurple/media.c	027d79a1920f3cf84f40b8febcda52511325bdca
+++ libpurple/media.c	1b83ee4f60002fd4ef903288d8564b6e6b494f11
@@ -265,6 +265,7 @@ purple_media_session_free(PurpleMediaSes
 purple_media_session_free(PurpleMediaSession *session)
 {
 	g_free(session->id);
+	g_object_unref(session->session);
 	g_free(session);
 }
 
@@ -279,6 +280,9 @@ purple_media_finalize (GObject *media)
 
 	g_free(priv->name);
 
+	for (; priv->streams; priv->streams = g_list_delete_link(priv->streams, priv->streams))
+		purple_media_stream_free(priv->streams->data);
+
 	if (priv->sessions) {
 		GList *sessions = g_hash_table_get_values(priv->sessions);
 		for (; sessions; sessions = g_list_delete_link(sessions, sessions)) {
@@ -287,9 +291,6 @@ purple_media_finalize (GObject *media)
 		g_hash_table_destroy(priv->sessions);
 	}
 
-	for (; priv->streams; priv->streams = g_list_delete_link(priv->streams, priv->streams))
-		purple_media_stream_free(priv->streams->data);
-
 	if (priv->participants) {
 		GList *participants = g_hash_table_get_values(priv->participants);
 		for (; participants; participants = g_list_delete_link(participants, participants))


More information about the Commits mailing list