From ba291a03f4cd44f8aa7a95d83bc94190477d1e5f Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Mon, 6 Apr 2020 13:29:36 +0300 Subject: [PATCH 1/2] Fix memory leak in cons_show_disco_info() --- src/ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/console.c b/src/ui/console.c index 6b35cead..4683f699 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -751,7 +751,7 @@ cons_show_disco_info(const char *jid, GSList *identities, GSList *features) identity_str = g_string_append(identity_str, identity->category); } cons_show(identity_str->str); - g_string_free(identity_str, FALSE); + g_string_free(identity_str, TRUE); identities = g_slist_next(identities); } From 42b6d78a703f33b3b38c1b973660b9abfbb801cd Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Mon, 6 Apr 2020 13:30:25 +0300 Subject: [PATCH 2/2] Fix multiple memory leaks related to rosterwin_roster() There are multiple paths which lead to rosterwin_roster(). The function doesn't free list returned by wins_get_private_chats(). --- src/ui/rosterwin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 1d295053..9615db22 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -172,6 +172,7 @@ rosterwin_roster(void) _rosterwin_private_chats(layout, orphaned_privchats); } prefs_free_string(privpref); + g_list_free(privchats); g_list_free(orphaned_privchats); }