changeset 22983:882af25a8edf

Fix handling of empty groups in MySpace. Fixes #3378.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 16 May 2008 20:47:28 +0000
parents 77fc073e5a0b
children 493239b86bf6
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Fri May 16 20:19:12 2008 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Fri May 16 20:47:28 2008 +0000
@@ -2824,7 +2824,8 @@
 	/* 1. Creates a new group, or gets existing group if it exists (or so
 	 * the documentation claims). */
 	group_name = msim_msg_get_string(contact_info, "GroupName");
-	if (!group_name) {
+	if (!group_name || (*group_name == '\0')) {
+		g_free(group_name);
 		group_name = g_strdup(_("IM Friends"));
 		purple_debug_info("myspace", "No GroupName specified, defaulting to '%s'.\n", group_name);
 	}