From 911d97a988d5f3d90c4b15c05adc733ada1fb37a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 4 Aug 2011 16:19:54 +0100 Subject: Error handling fixes. Found one double free() bug causing troubles when a buddy_msg() handler takes down the IM connection immediately. --- protocols/jabber/sasl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols/jabber/sasl.c') diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c index f232864b..f21a6706 100644 --- a/protocols/jabber/sasl.c +++ b/protocols/jabber/sasl.c @@ -447,7 +447,8 @@ void sasl_oauth2_init( struct im_connection *ic ) static gboolean sasl_oauth2_remove_contact( gpointer data, gint fd, b_input_condition cond ) { struct im_connection *ic = data; - imcb_remove_buddy( ic, "jabber_oauth", NULL ); + if( g_slist_find( jabber_connections, ic ) ) + imcb_remove_buddy( ic, "jabber_oauth", NULL ); return FALSE; } -- cgit v1.2.3