--- a/libpurple/plugins/perl/common/Cmds.xs Thu Dec 06 01:17:36 2007 +0000 +++ b/libpurple/plugins/perl/common/Cmds.xs Thu Dec 06 01:19:19 2007 +0000 @@ -66,21 +66,23 @@ Purple::Conversation conv const gchar *command PREINIT: - GList *l; + GList *l, *ll; PPCODE: - for (l = purple_cmd_help(conv, command); l != NULL; l = l->next) { + for (l = ll = purple_cmd_help(conv, command); l != NULL; l = l->next) { XPUSHs(sv_2mortal(newSVpv(l->data, 0))); } + g_list_free(ll); void purple_cmd_list(conv) Purple::Conversation conv PREINIT: - GList *l; + GList *l, *ll; PPCODE: - for (l = purple_cmd_list(conv); l != NULL; l = l->next) { + for (l = ll = purple_cmd_list(conv); l != NULL; l = l->next) { XPUSHs(sv_2mortal(newSVpv(l->data, 0))); } + g_list_free(ll); Purple::Cmd::Id purple_cmd_register(plugin, command, args, priority, flag, prpl_id, func, helpstr, data = 0)