changeset 28352:3061a0c72b26

Fix an incorrect leak-fix. Thanks Elliott!
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 09 Oct 2009 17:33:16 +0000
parents 911560d0c36f
children 6a23d7f84143
files libpurple/protocols/msn/oim.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/oim.c	Fri Oct 09 01:39:41 2009 +0000
+++ b/libpurple/protocols/msn/oim.c	Fri Oct 09 17:33:16 2009 +0000
@@ -373,6 +373,7 @@
 								msg->oim_msg);
 							g_queue_push_head(oim->send_queue, msg);
 							msn_oim_send_msg(oim);
+							msg = NULL;
 						} else {
 							purple_debug_info("msn",
 								"Can't find lock key for OIM: %s\n",
@@ -393,6 +394,7 @@
 						purple_debug_info("msn", "Resending OIM: %s\n", msg->oim_msg);
 						g_queue_push_head(oim->send_queue, msg);
 						msn_oim_send_msg(oim);
+						msg = NULL;
 					}
 				} else {
 					/* Report the error */
@@ -426,6 +428,9 @@
 			}
 		}
 	}
+
+	if (msg)
+		msn_oim_free_send_req(msg);
 }
 
 void
@@ -481,7 +486,6 @@
 
 	g_free(msg_body);
 	g_free(soap_body);
-	msn_oim_free_send_req(oim_request);
 }
 
 /****************************************