Mercurial > pidgin.yaz
diff src/protocols/sametime/sametime.c @ 12126:35c4797c5c57
[gaim-migrate @ 14426]
SF Patch #1359761, from sadrul
"This patch plugs some memory leaks in a few places
ragarding gaim_find_buddies. It also changes the call
to gaim_find_buddy in a couple of places that only
needs one buddy."
I also fixed a case of g_free()ing a const char * in the sametime prpl.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 18 Nov 2005 12:05:40 +0000 |
parents | 40724851e95e |
children | e09bf5bc81d8 |
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c Fri Nov 18 07:23:29 2005 +0000 +++ b/src/protocols/sametime/sametime.c Fri Nov 18 12:05:40 2005 +0000 @@ -1681,7 +1681,7 @@ struct mwGaimPluginData *pd; GaimAccount *acct; GaimConversation *conv; - GSList *buddies; + GaimBuddy *buddy; char *who = from->user_id; char *msg; @@ -1690,10 +1690,9 @@ conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, acct); if(! conv) conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, acct, who); - buddies = gaim_find_buddies(acct, who); - if(buddies) { - who = (char *) gaim_buddy_get_contact_alias(buddies->data); - g_slist_free(buddies); + buddy = gaim_find_buddy(acct, who); + if(buddy) { + who = g_strdup(gaim_buddy_get_contact_alias(buddy)); } who = g_strdup_printf(_("Announcement from %s"), who);