about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-09 11:54:02 +0200
committerGitHub <noreply@github.com>2020-04-09 11:54:02 +0200
commitc90a5d174e46f8bd95ebe4198624b5e199e1748e (patch)
tree7414259f23b056be69cc28556535def0a39a0c1b /src
parent401ebce84e87ab35746f488e58bba25dfe5b4c2f (diff)
parentaa4faf6075c230e6740af7278ac9989da05174f4 (diff)
downloadprofani-tty-c90a5d174e46f8bd95ebe4198624b5e199e1748e.tar.gz
Merge pull request #1307 from profanity-im/memleaks
Fix memory leaks in _rosterwin_resources()
Diffstat (limited to 'src')
-rw-r--r--src/ui/rosterwin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c
index 9615db22..58d0bdf9 100644
--- a/src/ui/rosterwin.c
+++ b/src/ui/rosterwin.c
@@ -619,6 +619,7 @@ _rosterwin_resources(ProfLayoutSplit *layout, PContact contact, int current_inde
 
             wattron(layout->subwin, theme_attrs(presence_colour));
             win_sub_print(layout->subwin, unreadmsg->str, FALSE, wrap, current_indent);
+            g_string_free(unreadmsg, TRUE);
             wattroff(layout->subwin, theme_attrs(presence_colour));
         }
         prefs_free_string(unreadpos);
@@ -635,6 +636,7 @@ _rosterwin_resources(ProfLayoutSplit *layout, PContact contact, int current_inde
 
             wattron(layout->subwin, theme_attrs(presence_colour));
             win_sub_print(layout->subwin, unreadmsg->str, FALSE, wrap, current_indent);
+            g_string_free(unreadmsg, TRUE);
             wattroff(layout->subwin, theme_attrs(presence_colour));
         }
         prefs_free_string(unreadpos);