changeset 28341:caef0d8dcb04

Leak fix.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 08 Oct 2009 15:32:04 +0000
parents 24702a4affaa
children 65e8c39cc5f6
files libpurple/protocols/msn/nexus.c libpurple/protocols/msn/notification.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/nexus.c	Thu Oct 08 04:02:26 2009 +0000
+++ b/libpurple/protocols/msn/nexus.c	Thu Oct 08 15:32:04 2009 +0000
@@ -338,8 +338,10 @@
 			xmlnode *cipher = xmlnode_get_child(node, "RequestedSecurityToken/EncryptedData/CipherData/CipherValue");
 			xmlnode *secret = xmlnode_get_child(node, "RequestedProofToken/BinarySecret");
 
+			g_free(nexus->cipher);
 			nexus->cipher = xmlnode_get_data(cipher);
 			data = xmlnode_get_data(secret);
+			g_free(nexus->secret);
 			nexus->secret = (char *)purple_base64_decode(data, NULL);
 			g_free(data);
 
--- a/libpurple/protocols/msn/notification.c	Thu Oct 08 04:02:26 2009 +0000
+++ b/libpurple/protocols/msn/notification.c	Thu Oct 08 15:32:04 2009 +0000
@@ -621,7 +621,7 @@
 				user->list_op & MSN_LIST_OP_MASK, network);
 		payload = xmlnode_to_str(adl_node, &payload_len);
 		msn_notification_post_adl(session->notification->cmdproc, payload, payload_len);
-
+		g_free(payload);
 	} else {
 		purple_debug_error("msn",
 		                   "Got FQY update for unknown user %s on network %d.\n",