From: <mar...@us...> - 2006-12-27 13:34:35
|
Revision: 18062 http://svn.sourceforge.net/gaim/?rev=18062&view=rev Author: markhuetsch Date: 2006-12-27 05:34:33 -0800 (Wed, 27 Dec 2006) Log Message: ----------- Fix a crash. If we are redirected and then disconnected before _qq_got_login() gets called, we'd be trying to free already freed memory. Modified Paths: -------------- trunk/libgaim/protocols/qq/qq_proxy.c Modified: trunk/libgaim/protocols/qq/qq_proxy.c =================================================================== --- trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-27 13:27:55 UTC (rev 18061) +++ trunk/libgaim/protocols/qq/qq_proxy.c 2006-12-27 13:34:33 UTC (rev 18062) @@ -156,7 +156,6 @@ qd->logged_in = FALSE; qd->channel = 1; qd->uid = strtol(gaim_account_get_username(gaim_connection_get_account(gc)), NULL, 10); - qd->before_login_packets = g_queue_new(); /* now generate md5 processed passwd */ passwd = gaim_account_get_password(gaim_connection_get_account(gc)); @@ -432,6 +431,7 @@ gboolean use_tcp, gboolean is_redirect) { GaimConnection *gc; + qq_data *qd; g_return_val_if_fail(host != NULL, -1); g_return_val_if_fail(port > 0, -1); @@ -442,6 +442,9 @@ if (is_redirect) _qq_common_clean(gc); + qd = (qq_data *) gc->proto_data; + qd->before_login_packets = g_queue_new(); + return _proxy_connect_full(account, host, port, _qq_got_login, gc, use_tcp); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |