From: Richard L. <rl...@us...> - 2005-11-18 12:05:49
|
Update of /cvsroot/gaim/gaim/src/protocols/sametime In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14749/src/protocols/sametime Modified Files: sametime.c Log Message: 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. Index: sametime.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/sametime/sametime.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -p -r1.23 -r1.24 --- sametime.c 15 Nov 2005 20:51:58 -0000 1.23 +++ sametime.c 18 Nov 2005 12:05:40 -0000 1.24 @@ -1681,7 +1681,7 @@ static void mw_session_announce(struct m struct mwGaimPluginData *pd; GaimAccount *acct; GaimConversation *conv; - GSList *buddies; + GaimBuddy *buddy; char *who = from->user_id; char *msg; @@ -1690,10 +1690,9 @@ static void mw_session_announce(struct m 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); |