changeset 30933:ad11780ba8b9

Prevent a use-after-free. The timeout_cb may free the MsnTransaction, so we can't use it after that.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 21 Nov 2010 06:58:45 +0000
parents dec85cefc758
children 4e097dfb7784
files libpurple/protocols/msn/transaction.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/transaction.c	Sun Nov 21 00:53:26 2010 +0000
+++ b/libpurple/protocols/msn/transaction.c	Sun Nov 21 06:58:45 2010 +0000
@@ -220,10 +220,11 @@
 	purple_debug_info("msn", "timed out: %s %d %s\n", trans->command, trans->trId, trans->params);
 #endif
 
+	trans->timer = 0;
+
 	if (trans->timeout_cb != NULL)
 		trans->timeout_cb(trans->cmdproc, trans);
 
-	trans->timer = 0;
 	return FALSE;
 }