diff options
author | James Booth <boothj5@gmail.com> | 2015-11-21 21:19:28 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-11-21 21:19:28 +0000 |
commit | b73ff08a72ceb3f3ffe15fd9222d8fa56c35f01c (patch) | |
tree | a1f3f06494abf65281814b06fe32870dd2513f8f /src/ui | |
parent | 4b022687fa4a47ecaca6a2002ff435c769007456 (diff) | |
download | profani-tty-b73ff08a72ceb3f3ffe15fd9222d8fa56c35f01c.tar.gz |
Free pref strings
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/rosterwin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 0dc1baed..c2267437 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -53,6 +53,7 @@ _rosterwin_presence(ProfLayoutSplit *layout, int indent, theme_item_t colour, co char *by = prefs_get_string(PREF_ROSTER_BY); gboolean by_presence = g_strcmp0(by, "presence") == 0; + prefs_free_string(by); // show only status when grouped by presence if (by_presence) { @@ -207,6 +208,7 @@ _rosterwin_contacts_by_group(ProfLayoutSplit *layout, char *group) } else { contacts = roster_get_group(group, ROSTER_ORD_NAME, offline); } + prefs_free_string(order); if (contacts || prefs_get_boolean(PREF_ROSTER_EMPTY)) { wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER)); @@ -245,6 +247,7 @@ _rosterwin_contacts_by_no_group(ProfLayoutSplit *layout) } else { contacts = roster_get_nogroup(ROSTER_ORD_NAME, offline); } + prefs_free_string(order); if (contacts || prefs_get_boolean(PREF_ROSTER_EMPTY)) { wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER)); @@ -280,7 +283,7 @@ rosterwin_roster(void) ProfLayoutSplit *layout = (ProfLayoutSplit*)console->layout; assert(layout->memcheck == LAYOUT_SPLIT_MEMCHECK); - char *by = prefs_get_string(PREF_ROSTER_BY); + char *by = prefs_get_string(PREF_ROSTER_BY); if (g_strcmp0(by, "presence") == 0) { werase(layout->subwin); _rosterwin_contacts_by_presence(layout, "chat", "Available for chat"); @@ -311,6 +314,7 @@ rosterwin_roster(void) } else { contacts = roster_get_contacts(ROSTER_ORD_NAME, offline); } + prefs_free_string(order); werase(layout->subwin); @@ -338,6 +342,6 @@ rosterwin_roster(void) } g_slist_free(contacts); } - free(by); + prefs_free_string(by); } } |