pidgin: Remove a timeout when destroying this object to avoid a use-after-free

Sun, 21 Nov 2010 22:07:08 +0000

author
Jakub Adam <jakub.adam@ktknet.cz>
date
Sun, 21 Nov 2010 22:07:08 +0000
changeset 31151
f352f10d5755
parent 31150
b6dcc1462d36
child 31152
f432b3f58724

pidgin: Remove a timeout when destroying this object to avoid a use-after-free

Patch from Jakub "haakon" Adam. Closes #12806


committer: Paul Aurich <darkrain42@pidgin.im>

ChangeLog file | annotate | diff | comparison | revisions
pidgin/gtkmedia.c file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sun Nov 21 19:42:37 2010 +0000
+++ b/ChangeLog	Sun Nov 21 22:07:08 2010 +0000
@@ -7,6 +7,10 @@
 	  the "Unable to validate certificate" error for omega.contacts.msn.com.
 	  (#12906)
 
+	Pidgin:
+	* Avoid a use-after-free race condition in the media code (when
+	  there's an error reported by GStreamer). (#12806, Jakub Adam)
+
 	AIM and ICQ:
 	* SSL option has been changed to a tri-state menu with choices for
 	  "Don't Use Encryption", "Use Encryption if Available", and "Require
--- a/pidgin/gtkmedia.c	Sun Nov 21 19:42:37 2010 +0000
+++ b/pidgin/gtkmedia.c	Sun Nov 21 22:07:08 2010 +0000
@@ -399,6 +399,9 @@
 		gtkmedia->priv->ui = NULL;
 	}
 
+	if (gtkmedia->priv->timeout_id != 0)
+		g_source_remove(gtkmedia->priv->timeout_id);
+
 	G_OBJECT_CLASS(parent_class)->dispose(media);
 }
 

mercurial