changeset 22229:ae5917260eac

merge of '9d22bc3a3d82cb26e7196d41b472b81c7660274d' and 'f6e17bf35872d70d9ebba4cf860470a5b21d54ce'
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Tue, 29 Jan 2008 01:51:26 +0000
parents 9f95357c21b9 (diff) 6337a8fd7784 (current diff)
children 0f654f866de0 4af9179e33df e808d83d797e e9cf897bd873
files
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Mon Jan 28 05:31:28 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Tue Jan 29 01:51:26 2008 +0000
@@ -1223,16 +1223,15 @@
  *
  * @param wanted_uid
  *
- * @return Username of wanted_uid, if on blist, or NULL. Static string.
- * 	TODO: The username string here is a new string from g_strdup(), not
- * 	a static string that doesn't need to be fixed. Probably leaks. TODO: fix.
+ * @return Username of wanted_uid, if on blist, or NULL. 
+ * 	This is a static string, so don't free it. Copy it if needed.
  *
  */
 static const gchar *
 msim_uid2username_from_blist(PurpleAccount *account, guint wanted_uid)
 {
 	GSList *buddies, *cur;
-	gchar *ret;
+	const gchar *ret;
 
 	buddies = purple_find_buddies(account, NULL); 
 
@@ -1258,7 +1257,7 @@
 
 		if (uid == wanted_uid)
 		{
-			ret = g_strdup(name);
+			ret = name;
 			break;
 		}
 	}
@@ -2822,8 +2821,9 @@
 	msim_store_user_info(session, contact_info, NULL);
 
 	/* TODO: other fields, store in 'user' */
-
 	msim_msg_free(contact_info);
+
+	g_free(username);
 }
 
 /** Add first ContactID in contact_info to buddy's list. Used to add