Mercurial > pidgin
diff libpurple/account.c @ 15593:f485c87e6546
sf patch #1655057, from Peter Tang
Fix a memory leak when signing off an account, I think. Peter Tang
found it and suggested one fix. I suggested another, then Sadrul
made it work. I like this change. We're now re-using GaimStatusType
objects instead of making lots of copies of them.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 09 Feb 2007 07:42:01 +0000 |
parents | cb3800fabd76 |
children | 32c366eeeb99 |
line wrap: on
line diff
--- a/libpurple/account.c Fri Feb 09 07:34:51 2007 +0000 +++ b/libpurple/account.c Fri Feb 09 07:42:01 2007 +0000 @@ -835,8 +835,6 @@ /* 0 is not a valid privacy setting */ account->perm_deny = GAIM_PRIVACY_ALLOW_ALL; - account->presence = gaim_presence_new_for_account(account); - prpl = gaim_find_prpl(protocol_id); if (prpl == NULL) @@ -846,6 +844,8 @@ if (prpl_info != NULL && prpl_info->status_types != NULL) gaim_account_set_status_types(account, prpl_info->status_types(account)); + account->presence = gaim_presence_new_for_account(account); + status_type = gaim_account_get_status_type_with_primitive(account, GAIM_STATUS_AVAILABLE); if (status_type != NULL) gaim_presence_set_status_active(account->presence,