[gaim-migrate @ 14021]

Sun, 23 Oct 2005 00:29:12 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sun, 23 Oct 2005 00:29:12 +0000
changeset 11730
649c38d2a8ab
parent 11729
56b1a9f35b74
child 11731
bd504fc87cf0

[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: Richard Laager <rlaager@pidgin.im>

src/prpl.c file | annotate | diff | comparison | revisions
--- 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;
 }
 

mercurial