comparison mcabber/mcabber/settings.c @ 2339:7f11a567d236

Implemented settings_free() This removes many leaked memory messages from valgrind and thus makes it easier to read its output.
author franky
date Sat, 18 May 2019 20:44:01 +0200
parents ffd0e57e9563
children 6eeef7be58f3
comparison
equal deleted inserted replaced
2338:6424627913be 2339:7f11a567d236
84 #ifdef HAVE_LIBOTR 84 #ifdef HAVE_LIBOTR
85 otrpolicy = g_hash_table_new(&g_str_hash, &g_str_equal); 85 otrpolicy = g_hash_table_new(&g_str_hash, &g_str_equal);
86 #endif 86 #endif
87 } 87 }
88 88
89 void settings_free(void)
90 {
91 g_hash_table_destroy(option);
92 g_hash_table_destroy(alias);
93 g_hash_table_destroy(binding);
94 g_hash_table_destroy(guards);
95 #ifdef HAVE_GPGME
96 g_hash_table_destroy(pgpopt);
97 #endif
98 #ifdef HAVE_LIBOTR
99 g_hash_table_destroy(otrpolicy);
100 #endif
101 }
102
89 // settings_get_mcabber_config_dir() 103 // settings_get_mcabber_config_dir()
90 // Returns the mcabber configuration directory. 104 // Returns the mcabber configuration directory.
91 // The directory is looked up for only once (and the string is never freed, 105 // The directory is looked up for only once (and the string is never freed,
92 // but we might change this later). 106 // but we might change this later).
93 const gchar *settings_get_mcabber_config_dir(void) 107 const gchar *settings_get_mcabber_config_dir(void)