diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config/preferences.c | 8 | ||||
-rw-r--r-- | src/config/preferences.h | 1 | ||||
-rw-r--r-- | src/plugins/callbacks.c | 3 | ||||
-rw-r--r-- | src/plugins/plugins.c | 1 |
4 files changed, 11 insertions, 2 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); diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c index 4654be70..9da8947e 100644 --- a/src/plugins/callbacks.c +++ b/src/plugins/callbacks.c @@ -92,13 +92,14 @@ plugins_run_command(const char * const input) gchar **args = parse_args(input, command->min_args, command->max_args, &result); if (result == FALSE) { ui_invalid_command_usage(command->usage, NULL); + g_strfreev(split); return TRUE; } else { command->callback_func(command, args); g_strfreev(split); + g_strfreev(args); return TRUE; } - g_strfreev(args); } p_command = g_slist_next(p_command); } diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 92fa1686..b39bc355 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -92,6 +92,7 @@ plugins_init(void) curr = g_slist_next(curr); } } + prefs_free_plugins(plugins_load); return; } |