Mercurial > pidgin.yaz
diff plugins/perl/common/Account.xs @ 13833:571aebbe5ec6
[gaim-migrate @ 16282]
SF Patch #1502594 from Yosef Radchenko
"Patches three instances of memory leaks with gaim_accounts_get_all_active"
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 19 Jun 2006 05:39:30 +0000 |
parents | 702107dd58f1 |
children |
line wrap: on
line diff
--- a/plugins/perl/common/Account.xs Mon Jun 19 05:17:54 2006 +0000 +++ b/plugins/perl/common/Account.xs Mon Jun 19 05:39:30 2006 +0000 @@ -286,11 +286,13 @@ void gaim_accounts_get_all_active() PREINIT: - GList *l; + GList *list, *iter; PPCODE: - for (l = gaim_accounts_get_all_active(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account"))); + list = gaim_accounts_get_all_active(); + for (iter = gaim_accounts_get_all_active(); iter != NULL; iter = iter->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(iter->data, "Gaim::Account"))); } + g_list_free(list); Gaim::Account gaim_accounts_find(name, protocol)