Mercurial > pidgin.yaz
comparison libpurple/media.c @ 26057:584a4f5ce4dc
Free Farsight objects better.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 15 Dec 2008 09:55:25 +0000 |
parents | bcbc62bb2496 |
children | 0ad1b8e950d7 |
comparison
equal
deleted
inserted
replaced
26056:bcbc62bb2496 | 26057:584a4f5ce4dc |
---|---|
263 | 263 |
264 static void | 264 static void |
265 purple_media_session_free(PurpleMediaSession *session) | 265 purple_media_session_free(PurpleMediaSession *session) |
266 { | 266 { |
267 g_free(session->id); | 267 g_free(session->id); |
268 g_object_unref(session->session); | |
268 g_free(session); | 269 g_free(session); |
269 } | 270 } |
270 | 271 |
271 static void | 272 static void |
272 purple_media_finalize (GObject *media) | 273 purple_media_finalize (GObject *media) |
276 | 277 |
277 purple_media_manager_remove_media(purple_media_manager_get(), | 278 purple_media_manager_remove_media(purple_media_manager_get(), |
278 PURPLE_MEDIA(media)); | 279 PURPLE_MEDIA(media)); |
279 | 280 |
280 g_free(priv->name); | 281 g_free(priv->name); |
282 | |
283 for (; priv->streams; priv->streams = g_list_delete_link(priv->streams, priv->streams)) | |
284 purple_media_stream_free(priv->streams->data); | |
281 | 285 |
282 if (priv->sessions) { | 286 if (priv->sessions) { |
283 GList *sessions = g_hash_table_get_values(priv->sessions); | 287 GList *sessions = g_hash_table_get_values(priv->sessions); |
284 for (; sessions; sessions = g_list_delete_link(sessions, sessions)) { | 288 for (; sessions; sessions = g_list_delete_link(sessions, sessions)) { |
285 purple_media_session_free(sessions->data); | 289 purple_media_session_free(sessions->data); |
286 } | 290 } |
287 g_hash_table_destroy(priv->sessions); | 291 g_hash_table_destroy(priv->sessions); |
288 } | 292 } |
289 | |
290 for (; priv->streams; priv->streams = g_list_delete_link(priv->streams, priv->streams)) | |
291 purple_media_stream_free(priv->streams->data); | |
292 | 293 |
293 if (priv->participants) { | 294 if (priv->participants) { |
294 GList *participants = g_hash_table_get_values(priv->participants); | 295 GList *participants = g_hash_table_get_values(priv->participants); |
295 for (; participants; participants = g_list_delete_link(participants, participants)) | 296 for (; participants; participants = g_list_delete_link(participants, participants)) |
296 g_object_unref(participants->data); | 297 g_object_unref(participants->data); |