Mercurial > pidgin
diff libpurple/protocols/msn/session.c @ 31262:feb50c34ec46
Fix a memleak in the MSN prpl when removing a buddy from your buddy list.
We needed to call msn_user_unref() after calling msn_userlist_remove_user()
I chose to fix this by changing msn_userlist_add_user() and
msn_userlist_remove_user() to incremend and decrement the reference counter
themselves--after all, they ARE the ones who add/remove a reference to
the MsnUser struct. Conceptually I thought this made the most sense.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 28 Feb 2011 07:12:27 +0000 |
parents | 78dccab9824c |
children | c164dcad5e28 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/session.c Mon Feb 28 06:53:53 2011 +0000 +++ b/libpurple/protocols/msn/session.c Mon Feb 28 07:12:27 2011 +0000 @@ -46,7 +46,7 @@ session->user = msn_user_new(session->userlist, purple_account_get_username(account), NULL); - msn_userlist_add_user(session->userlist, msn_user_ref(session->user)); + msn_userlist_add_user(session->userlist, session->user); session->oim = msn_oim_new(session); session->protocol_ver = 0;