changeset 30085:173e403cffbb

Don't free captcha_req just before dereferencing it. Probably fixes https://bugzilla.redhat.com/show_bug.cgi?id=583507
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 23 May 2010 16:53:24 +0000
parents c80d5cf9d88e
children 86c917db4c89 0d5dab71be7a
files libpurple/protocols/qq/qq_base.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/qq/qq_base.c	Sat May 22 15:14:54 2010 +0000
+++ b/libpurple/protocols/qq/qq_base.c	Sun May 23 16:53:24 2010 +0000
@@ -811,11 +811,11 @@
 static void captcha_input_cancel_cb(qq_captcha_request *captcha_req,
 		PurpleRequestFields *fields)
 {
-	captcha_request_destory(captcha_req);
-
 	purple_connection_error_reason(captcha_req->gc,
 			PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
 			_("Failed captcha verification"));
+
+	captcha_request_destory(captcha_req);
 }
 
 static void captcha_input_ok_cb(qq_captcha_request *captcha_req,