pidgin: e1fd1e27: This should fix another crash I've seen....

markdoliner at pidgin.im markdoliner at pidgin.im
Tue Nov 18 02:35:21 EST 2008


-----------------------------------------------------------------
Revision: e1fd1e27a14e8cc717dc7fb6cb69ff1f10672704
Ancestor: 050e412d19af350e54a9105f34339a2690d8fc08
Author: markdoliner at pidgin.im
Date: 2008-11-18T07:32:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e1fd1e27a14e8cc717dc7fb6cb69ff1f10672704

Modified files:
        libpurple/protocols/msn/servconn.c

ChangeLog: 

This should fix another crash I've seen.  We weren't correctly
cancelling the proxy connect when we destroyed the servconn
because we were only calling msn_servconn_disconnect() if we
had actually connected.

So always call msn_servconn_disconnect() from msn_servconn_destroy()
and let the disconnect function deal with only closing stuff that
is actually open.

Here's the backtrace:
#0  0x0000000000000000 in ?? ()
#1  0x00000000005f95e0 in connect_cb (data=0x2ab92ef6e7b0, source=7, error_message=0x0)
    at servconn.c:185
#2  0x000000000056e7da in purple_proxy_connect_data_connected (connect_data=0x2ab92ef70260)
    at proxy.c:598
#3  0x000000000056e90d in socket_ready_cb (data=0x2ab92ef70260, source=7, cond=PURPLE_INPUT_WRITE)
    at proxy.c:657
#4  0x00000000004db70c in pidgin_io_invoke (source=0x2ab92ee4be50, condition=G_IO_OUT,
    data=0x2ab92dfd3130) at gtkeventloop.cc:79

In frame 1, servconn is not valid (it has already been freed)

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/servconn.c	83b030ababe1574d247cb956bcfab2de3a372eac
+++ libpurple/protocols/msn/servconn.c	dc419e3c0bc48b9b56e6a1e6a70ffb1b1245a13f
@@ -69,8 +69,7 @@ msn_servconn_destroy(MsnServConn *servco
 		return;
 	}
 
-	if (servconn->connected)
-		msn_servconn_disconnect(servconn);
+	msn_servconn_disconnect(servconn);
 
 	if (servconn->destroy_cb)
 		servconn->destroy_cb(servconn);


More information about the Commits mailing list