--- a/libpurple/protocols/jabber/buddy.c Sun Nov 03 09:22:21 2019 +0000
+++ b/libpurple/protocols/jabber/buddy.c Sun Nov 03 20:23:01 2019 +0300
@@ -708,6 +708,7 @@
if (jbi->timeout_handle > 0)
g_source_remove(jbi->timeout_handle);
+ g_slist_free(jbi->ids); g_hash_table_destroy(jbi->resources);
g_free(jbi->last_message);
@@ -1459,22 +1460,8 @@
void jabber_buddy_remove_all_pending_buddy_info_requests(JabberStream *js)
- if (js->pending_buddy_info_requests)
- GSList *l = js->pending_buddy_info_requests;
- g_slist_free(jbi->ids);
- jabber_buddy_info_destroy(jbi);
- g_slist_free(js->pending_buddy_info_requests);
- js->pending_buddy_info_requests = NULL;
+ g_slist_free_full(js->pending_buddy_info_requests, (GDestroyNotify)jabber_buddy_info_destroy); + js->pending_buddy_info_requests = NULL; static gboolean jabber_buddy_get_info_timeout(gpointer data)
--- a/libpurple/protocols/novell/nmrtf.c Sun Nov 03 09:22:21 2019 +0000
+++ b/libpurple/protocols/novell/nmrtf.c Sun Nov 03 20:23:01 2019 +0300
@@ -239,20 +239,18 @@
+nm_rtf_font_free(NMRtfFont *font) nm_rtf_deinit(NMRtfContext *ctx)
- for (node = ctx->font_table; node; node = node->next) {
- g_slist_free(ctx->font_table);
+ g_slist_free_full(ctx->font_table, (GDestroyNotify)nm_rtf_font_free); g_slist_free_full(ctx->saved, g_free);
g_string_free(ctx->ansi, TRUE);
g_string_free(ctx->output, TRUE);
--- a/libpurple/stringref.c Sun Nov 03 09:22:21 2019 +0000
+++ b/libpurple/stringref.c Sun Nov 03 20:23:01 2019 +0300
@@ -147,29 +147,18 @@
static void stringref_free(PurpleStringref *stringref)
- if (REFCOUNT(stringref->ref) != 0) {
- purple_debug(PURPLE_DEBUG_ERROR, "stringref", "Free of nonzero (%d) ref stringref!\n", REFCOUNT(stringref->ref));
+ if (REFCOUNT(stringref->ref) == 0) { + purple_debug(PURPLE_DEBUG_ERROR, "stringref", "Free of nonzero (%d) ref stringref!\n", REFCOUNT(stringref->ref));
static gboolean gs_idle_cb(gpointer data)
- while (gclist != NULL) {
- if (REFCOUNT(ref->ref) == 0) {
+ g_list_free_full(gclist, (GDestroyNotify)stringref_free); --- a/pidgin/gtksmiley-theme.c Sun Nov 03 09:22:21 2019 +0000
+++ b/pidgin/gtksmiley-theme.c Sun Nov 03 20:23:01 2019 +0300
@@ -91,33 +91,31 @@
******************************************************************************/
+pidgin_smiley_theme_index_smiley_free(PidginSmileyThemeIndexSmiley *smiley) + g_list_free_full(smiley->shortcuts, g_free); +pidgin_smiley_theme_index_protocol_free(PidginSmileyThemeIndexProtocol *proto) + g_list_free_full(proto->smileys, (GDestroyNotify)pidgin_smiley_theme_index_smiley_free); pidgin_smiley_theme_index_free(PidginSmileyThemeIndex *index)
g_return_if_fail(index != NULL);
- for (it = index->protocols; it; it = g_list_next(it)) {
- PidginSmileyThemeIndexProtocol *proto = it->data;
- for (it2 = proto->smileys; it2; it2 = g_list_next(it2)) {
- PidginSmileyThemeIndexSmiley *smiley = it2->data;
- g_list_free_full(smiley->shortcuts, g_free);
- g_list_free(proto->smileys);
- g_list_free(index->protocols);
+ g_list_free_full(index->protocols, (GDestroyNotify)pidgin_smiley_theme_index_protocol_free);