cpw.darkrain42.roster: 66b6d95f: Remove a now-superfluous g_strdup/g_free..

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun Jun 7 02:25:43 EDT 2009


-----------------------------------------------------------------
Revision: 66b6d95f74ec8ccc300839e1089b489230b661fd
Ancestor: e13a9adfb5cfaadc61d615911babc67fcdb332ac
Author: darkrain42 at pidgin.im
Date: 2009-06-07T06:12:22
Branch: im.pidgin.cpw.darkrain42.roster
URL: http://d.pidgin.im/viewmtn/revision/info/66b6d95f74ec8ccc300839e1089b489230b661fd

Modified files:
        libpurple/blist.c

ChangeLog: 

Remove a now-superfluous g_strdup/g_free.

None of the hash table functions use purple_normalize, this should be OK.

-------------- next part --------------
============================================================
--- libpurple/blist.c	880a4f22c97e117941e6d36767fd82cf322c0c91
+++ libpurple/blist.c	8cd6076ada44a45dc587083a444874f5f5b25515
@@ -2354,16 +2354,14 @@ PurpleBuddy *purple_find_buddy(PurpleAcc
 	g_return_val_if_fail((name != NULL) && (*name != '\0'), NULL);
 
 	hb.account = account;
-	hb.name = g_strdup(purple_normalize(account, name));
+	hb.name = purple_normalize(account, name);
 
 	for (group = purplebuddylist->root; group; group = group->next) {
 		hb.group = group;
 		if ((buddy = g_hash_table_lookup(purplebuddylist->buddies, &hb))) {
-			g_free(hb.name);
 			return buddy;
 		}
 	}
-	g_free(hb.name);
 
 	return NULL;
 }


More information about the Commits mailing list