Mercurial > pidgin.yaz
changeset 11730:ef57eccb9a3b
[gaim-migrate @ 14021]
SF Patch #1335179 from sadrul
'The "status_types" prpl-functions return a list, which
is used to create another list in
gaim_prpl_get_statuses, but the original list is never
freed.'
This looks correct to me. It compiles. What more could you want? ;)
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 23 Oct 2005 00:29:12 +0000 |
parents | 8a981a601242 |
children | d9aab67a9e07 |
files | src/prpl.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/prpl.c Sun Oct 23 00:16:03 2005 +0000 +++ b/src/prpl.c Sun Oct 23 00:29:12 2005 +0000 @@ -332,7 +332,7 @@ GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info; GList *statuses = NULL; - GList *l; + GList *l, *list; GaimStatus *status; g_return_val_if_fail(account != NULL, NULL); @@ -347,12 +347,14 @@ if (prpl_info == NULL || prpl_info->status_types == NULL) return NULL; - for (l = prpl_info->status_types(account); l != NULL; l = l->next) + for (l = list = prpl_info->status_types(account); l != NULL; l = l->next) { status = gaim_status_new((GaimStatusType *)l->data, presence); statuses = g_list_append(statuses, status); } + g_list_free(list); + return statuses; }