changeset 30634:509c63006b1f

Fix a typo and solve a crash. g_free() is not safe on uninitialized pointers.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 17 Jun 2010 22:20:25 +0000
parents 545ce15b619f
children 490707649f29
files libpurple/protocols/yahoo/libymsg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Thu Jun 17 21:23:01 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Thu Jun 17 22:20:25 2010 +0000
@@ -402,10 +402,10 @@
 	PurpleGroup *g;
 	GSList *list, *i;
 	gboolean onlist = FALSE;
-	char *oname;
+	char *oname = NULL;
 
 	if (g_hash_table_lookup_extended(ht, purple_normalize(account, name), (gpointer *)&oname, (gpointer *)&list))
-		g_hash_table_steal(ht, oname);
+		g_hash_table_steal(ht, name);
 	else
 		list = purple_find_buddies(account, name);