changeset 30948:b64b2b05bd3c

Sigh, so apparently, I broke receiving smileys with some over-zealous free-ing of slpmsgs. Remind me not to work at 4AM again.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Nov 2010 03:01:14 +0000
parents 0c60da8eb88c
children e946cb06faec
files libpurple/protocols/msn/slplink.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Mon Nov 22 02:39:10 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Mon Nov 22 03:01:14 2010 +0000
@@ -502,6 +502,7 @@
 	slpcall = msn_slp_process_msg(slplink, slpmsg);
 
 	if (slpcall == NULL) {
+		msn_slpmsg_destroy(slpmsg);
 		return;
 	}
 
@@ -540,6 +541,8 @@
 		}
 	}
 
+	msn_slpmsg_destroy(slpmsg);
+
 	if (!slpcall->wait_for_socket && slpcall->wasted)
 		msn_slpcall_destroy(slpcall);
 }
@@ -623,7 +626,9 @@
 	if (header->offset + header->length >= header->total_size)
 		process_complete_msg(slplink, slpmsg, header);
 
-	msn_slpmsg_destroy(slpmsg);
+	/* NOTE: The slpmsg will be destroyed in process_complete_msg or left in
+	   the slplink until fully received. Don't free it here!
+	 */
 }
 
 void