# HG changeset patch # User Richard Laager # Date 1130027352 0 # Node ID ef57eccb9a3b2b87fd75a17c9dc6686161c85a09 # Parent 8a981a601242af39aea0b9a666ece930023b49db [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 diff -r 8a981a601242 -r ef57eccb9a3b src/prpl.c --- 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; }