changeset 22828:7d3b2c023ad8

This is the way we plug the leaks, plug the leaks, plug the leaks...
author Daniel Atallah <daniel.atallah@gmail.com>
date Sat, 03 May 2008 17:56:04 +0000
parents 7b827f52ed0e
children 3c98c25b076b
files libpurple/protocols/msn/contact.c libpurple/protocols/msn/oim.c libpurple/protocols/msn/slp.c
diffstat 3 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Sat May 03 17:38:33 2008 +0000
+++ b/libpurple/protocols/msn/contact.c	Sat May 03 17:56:04 2008 +0000
@@ -498,11 +498,12 @@
 					mobile_number = xmlnode_get_data(number);
 
 					if (mobile_number &&
-						(messenger_enabled = xmlnode_get_child(contact_phone, "isMessengerEnabled")) 
-						&& (is_messenger_enabled = xmlnode_get_data(messenger_enabled)) 
-						&& !strcmp(is_messenger_enabled, "true"))
+							(messenger_enabled = xmlnode_get_child(contact_phone, "isMessengerEnabled")) 
+							&& (is_messenger_enabled = xmlnode_get_data(messenger_enabled)) 
+							&& !strcmp(is_messenger_enabled, "true"))
 						mobile = TRUE;
 
+					g_free(mobile_number);
 					g_free(is_messenger_enabled);
 				}
 			}
@@ -691,6 +692,7 @@
 				g_free(errorcode);
 				return TRUE;
 			}
+			g_free(errorcode);
 		}
 
 		return FALSE;
--- a/libpurple/protocols/msn/oim.c	Sat May 03 17:38:33 2008 +0000
+++ b/libpurple/protocols/msn/oim.c	Sat May 03 17:56:04 2008 +0000
@@ -170,7 +170,6 @@
 								msg->oim_msg);
 							g_queue_push_head(oim->send_queue, msg);
 							msn_oim_send_msg(oim);
-							return;
 						} else {
 							purple_debug_info("msnoim",
 								"can't find lock key for OIM: %s\n",
@@ -191,9 +190,10 @@
 						purple_debug_info("MSNP14","resending OIM: %s\n", msg->oim_msg);
 						g_queue_push_head(oim->send_queue, msg);
 						msn_oim_send_msg(oim);
-						return;
 					}
 				}
+
+				g_free(faultcode_str);
 			}
 		}
 	}
--- a/libpurple/protocols/msn/slp.c	Sat May 03 17:38:33 2008 +0000
+++ b/libpurple/protocols/msn/slp.c	Sat May 03 17:56:04 2008 +0000
@@ -359,6 +359,7 @@
 			g_free(bin);
 
 			purple_xfer_set_filename(xfer, file_name);
+			g_free(file_name);
 			purple_xfer_set_size(xfer, file_size);
 			purple_xfer_set_init_fnc(xfer, msn_xfer_init);
 			purple_xfer_set_request_denied_fnc(xfer, msn_xfer_cancel);