diff libpurple/protocols/yahoo/libymsg.c @ 28164:fd43a4d472cc

merged with im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 05 Aug 2009 04:44:01 +0900
parents 5ac0a83f0b21 90b471ba5282
children 90d108cda54e
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Mon Aug 03 14:17:27 2009 +0900
+++ b/libpurple/protocols/yahoo/libymsg.c	Wed Aug 05 04:44:01 2009 +0900
@@ -478,7 +478,7 @@
 	PurpleAccount *account = purple_connection_get_account(gc);
 	YahooData *yd = gc->proto_data;
 	GHashTable *ht;
-	char *norm_bud = NULL;
+	char *norm_bud;
 	char *temp = NULL;
 	YahooFriend *f = NULL; /* It's your friends. They're going to want you to share your StarBursts. */
 	                       /* But what if you had no friends? */
@@ -487,7 +487,6 @@
 	int protocol = 0;
 	int stealth = 0;
 
-
 	ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_slist_free);
 
 	while (l) {
@@ -546,9 +545,11 @@
 					purple_privacy_deny_add(account, norm_bud, 1);
 				}
 
+				g_free(norm_bud);
+
 				protocol = 0;
 				stealth = 0;
-				norm_bud = NULL;
+				g_free(temp);
 				temp = NULL;
 			}
 			break;
@@ -559,6 +560,7 @@
 			yd->current_list15_grp = yahoo_string_decode(gc, pair->value, FALSE);
 			break;
 		case 7: /* buddy's s/n */
+			g_free(temp);
 			temp = g_strdup(purple_normalize(account, pair->value));
 			break;
 		case 241: /* another protocol user */
@@ -594,7 +596,6 @@
 	yahoo_set_status(account, purple_account_get_active_status(account));
 
 	g_hash_table_destroy(ht);
-	g_free(norm_bud);
 	g_free(temp);
 }
 
@@ -2591,8 +2592,7 @@
 	PurpleAccount *account;
 	YahooData *yd;
 
-	if(!(p2p_data = data))
-		return ;
+	p2p_data = data;
 	yd = p2p_data->gc->proto_data;
 
 	if(error_message != NULL) {