about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-02-15 00:09:51 +0000
committerJames Booth <boothj5@gmail.com>2016-02-15 00:09:51 +0000
commit7945ef52773e78f41f3b9b4b29c6346a303fb4b8 (patch)
treec9fcba3eeab49d2272e079137863790bc99048d9 /src/config
parentbd928f0f29ba20cc8712e7fc76e4ac7deefb6cb7 (diff)
downloadprofani-tty-7945ef52773e78f41f3b9b4b29c6346a303fb4b8.tar.gz
Fix plugin command memleak
Diffstat (limited to 'src/config')
-rw-r--r--src/config/preferences.c8
-rw-r--r--src/config/preferences.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 752dc348..f12e88d7 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -591,7 +591,7 @@ prefs_set_autoxa_time(gint value)
     _save_prefs();
 }
 
-gchar **
+gchar**
 prefs_get_plugins(void)
 {
     if (!g_key_file_has_group(prefs, "plugins")) {
@@ -605,6 +605,12 @@ prefs_get_plugins(void)
 }
 
 void
+prefs_free_plugins(gchar **plugins)
+{
+    g_strfreev(plugins);
+}
+
+void
 prefs_set_occupants_size(gint value)
 {
     g_key_file_set_integer(prefs, PREF_GROUP_UI, "occupants.size", value);
diff --git a/src/config/preferences.h b/src/config/preferences.h
index f82a6541..f859201c 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -184,6 +184,7 @@ gint prefs_get_autoxa_time(void);
 void prefs_set_autoxa_time(gint value);
 
 gchar** prefs_get_plugins(void);
+void prefs_free_plugins(gchar **plugins);
 
 char prefs_get_otr_char(void);
 void prefs_set_otr_char(char ch);