--- a/libpurple/protocols/novell/nmrtf.c Tue Oct 15 04:05:27 2019 +0000 +++ b/libpurple/protocols/novell/nmrtf.c Wed Oct 16 01:06:17 2019 +0300 @@ -244,7 +244,6 @@ { GSList *node; NMRtfFont *font; - NMRtfStateSave *save; if (ctx) { for (node = ctx->font_table; node; node = node->next) { @@ -254,12 +253,7 @@ node->data = NULL; } g_slist_free(ctx->font_table); - for (node = ctx->saved; node; node = node->next) { - save = node->data; - g_free(save); - node->data = NULL; - } - g_slist_free(ctx->saved); + g_slist_free_full(ctx->saved, g_free); g_string_free(ctx->ansi, TRUE); g_string_free(ctx->output, TRUE); g_free(ctx); @@ -489,8 +483,7 @@ g_free(save_old); link_old = ctx->saved; - ctx->saved = g_slist_remove_link(ctx->saved, link_old); - g_slist_free_1(link_old); + ctx->saved = g_slist_delete_link(ctx->saved, link_old); return NMRTF_OK; }