changeset 21791:c80d0732fa40

memleak fixes
author Ka-Hing Cheung <khc@hxbc.us>
date Thu, 06 Dec 2007 08:10:46 +0000
parents bf03e9336c45
children f5d8acf1c5f4
files libpurple/protocols/msn/session.c libpurple/protocols/msn/state.c libpurple/protocols/msn/user.c
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/session.c	Thu Dec 06 07:24:10 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Thu Dec 06 08:10:46 2007 +0000
@@ -74,6 +74,7 @@
 
 	msn_userlist_destroy(session->userlist);
 
+	g_free(session->psm);
 	g_free(session->passport_info.t);
 	g_free(session->passport_info.p);
 	g_free(session->passport_info.kv);
--- a/libpurple/protocols/msn/state.c	Thu Dec 06 07:24:10 2007 +0000
+++ b/libpurple/protocols/msn/state.c	Thu Dec 06 08:10:46 2007 +0000
@@ -238,13 +238,15 @@
 	media = create_media_string(presence);
 	g_free(session->psm);
 	session->psm = msn_build_psm(statusline_stripped, media, NULL);
-	g_free(statusline_stripped);
 
 	payload = session->psm;
 	purple_debug_misc("MSNP14","Sending UUX command with payload: %s\n",payload);
 	trans = msn_transaction_new(cmdproc, "UUX", "%d", strlen(payload));
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
+
+	g_free(statusline_stripped);
+	g_free(media);
 }
 
 void
--- a/libpurple/protocols/msn/user.c	Thu Dec 06 07:24:10 2007 +0000
+++ b/libpurple/protocols/msn/user.c	Thu Dec 06 08:10:46 2007 +0000
@@ -83,6 +83,7 @@
 	g_free(user->media.artist);
 	g_free(user->media.title);
 	g_free(user->media.album);
+	g_free(user->statusline);
 
 	g_free(user);
 }