mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Free prefs strings, check for NULLs when closing pgp module
This commit is contained in:
parent
815ca16f48
commit
17919298f7
@ -74,15 +74,21 @@ p_gpg_init(void)
|
||||
void
|
||||
p_gpg_close(void)
|
||||
{
|
||||
if (fingerprints) {
|
||||
g_hash_table_destroy(fingerprints);
|
||||
fingerprints = NULL;
|
||||
}
|
||||
|
||||
if (fpskeyfile) {
|
||||
g_key_file_free(fpskeyfile);
|
||||
fpskeyfile = NULL;
|
||||
}
|
||||
|
||||
if (fpsloc) {
|
||||
free(fpsloc);
|
||||
fpsloc = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
p_gpg_on_connect(const char * const barejid)
|
||||
|
@ -1043,6 +1043,7 @@ cons_roster_setting(void)
|
||||
|
||||
char *by = prefs_get_string(PREF_ROSTER_BY);
|
||||
cons_show("Roster by (/roster) : %s", by);
|
||||
prefs_free_string(by);
|
||||
|
||||
int size = prefs_get_roster_size();
|
||||
cons_show("Roster size (/roster) : %d", size);
|
||||
|
@ -449,6 +449,7 @@ _inp_rl_tab_handler(int count, int key)
|
||||
if (result) {
|
||||
rl_replace_line(result, 0);
|
||||
rl_point = rl_end;
|
||||
free(result);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,7 @@ status_bar_resize(void)
|
||||
} else {
|
||||
mvwprintw(status_bar, 0, 1, message);
|
||||
}
|
||||
prefs_free_string(time_pref);
|
||||
}
|
||||
if (last_time) {
|
||||
g_date_time_unref(last_time);
|
||||
@ -310,6 +311,7 @@ status_bar_print_message(const char * const msg)
|
||||
} else {
|
||||
mvwprintw(status_bar, 0, 1, message);
|
||||
}
|
||||
prefs_free_string(time_pref);
|
||||
|
||||
int cols = getmaxx(stdscr);
|
||||
int bracket_attrs = theme_attrs(THEME_STATUS_BRACKET);
|
||||
@ -459,6 +461,7 @@ _status_bar_draw(void)
|
||||
wattroff(status_bar, bracket_attrs);
|
||||
g_free(date_fmt);
|
||||
}
|
||||
prefs_free_string(time_pref);
|
||||
|
||||
_update_win_statuses();
|
||||
wnoutrefresh(status_bar);
|
||||
|
Loading…
Reference in New Issue
Block a user