im.pidgin.pidgin: 3236dfb408a1020023e3fe090cf3044c65197c7b

datallah at pidgin.im datallah at pidgin.im
Mon Jan 14 18:35:43 EST 2008


-----------------------------------------------------------------
Revision: 3236dfb408a1020023e3fe090cf3044c65197c7b
Ancestor: 149ba15a619f096948289d3bb412d21a900dc0a7
Author: datallah at pidgin.im
Date: 2008-01-14T23:29:52
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/bonjour/jabber.c
        libpurple/protocols/bonjour/jabber.h

ChangeLog: 

Prevent a crash caused by freed memory being accessed.

-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/jabber.c	ef64bc3d8befdcd099cf5d2e18fdd3d860875525
+++ libpurple/protocols/bonjour/jabber.c	d907b13b82dd3527fdc40a5c15cb524a6c75f0df
@@ -995,7 +995,7 @@ async_bonjour_jabber_close_conversation(
 			bb->conversation = NULL;
 	}
 
-	purple_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv);
+	bconv->close_timeout = purple_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv);
 }
 
 void
@@ -1054,6 +1054,9 @@ bonjour_jabber_close_conversation(Bonjou
 		if (bconv->context != NULL)
 			bonjour_parser_setup(bconv);
 
+		if (bconv->close_timeout != 0)
+			purple_timeout_remove(bconv->close_timeout);
+
 		g_free(bconv->buddy_name);
 		g_free(bconv->ip);
 		g_free(bconv);
============================================================
--- libpurple/protocols/bonjour/jabber.h	7e2d922c4d1488ad59af7b76047d30517e9e98c1
+++ libpurple/protocols/bonjour/jabber.h	8ba8d69486cd048a1fe4f34b0c6596b7c2ff768c
@@ -47,6 +47,7 @@ typedef struct _BonjourJabberConversatio
 	gint socket;
 	guint rx_handler;
 	guint tx_handler;
+	guint close_timeout;
 	PurpleCircBuffer *tx_buf;
 	int sent_stream_start; /* 0 = Unsent, 1 = Partial, 2 = Complete */
 	gboolean recv_stream_start;


More information about the Commits mailing list