about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c5
-rw-r--r--src/command/commands.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 134bdf27..da908c02 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -2348,16 +2348,15 @@ _form_field_autocomplete(char *input, int *size)
             if (((g_strcmp0(split[1], "add") == 0) || (g_strcmp0(split[1], "remove") == 0))
                     && field_type == FIELD_LIST_MULTI) {
                 found = autocomplete_param_with_ac(input, size, beginning->str, value_ac, TRUE);
-                g_string_free(beginning, TRUE);
 
             } else if ((g_strcmp0(split[1], "remove") == 0) && field_type == FIELD_TEXT_MULTI) {
                 found = autocomplete_param_with_ac(input, size, beginning->str, value_ac, TRUE);
-                g_string_free(beginning, TRUE);
 
             } else if ((g_strcmp0(split[1], "remove") == 0) && field_type == FIELD_JID_MULTI) {
                 found = autocomplete_param_with_ac(input, size, beginning->str, value_ac, TRUE);
-                g_string_free(beginning, TRUE);
             }
+
+            g_string_free(beginning, TRUE);
         }
 
     } else if (g_strv_length(split) == 2) {
diff --git a/src/command/commands.c b/src/command/commands.c
index b8ed63e0..a4808b8a 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2077,15 +2077,15 @@ cmd_form(gchar **args, struct cmd_help_t help)
         iq_submit_room_config(room, current->form);
 
     }
+
     if (g_strcmp0(args[0], "cancel") == 0) {
         iq_room_config_cancel(room);
     }
-    if ((g_strcmp0(args[0], "submit") == 0) ||
-            (g_strcmp0(args[0], "cancel") == 0)) {
+
+    if ((g_strcmp0(args[0], "submit") == 0) || (g_strcmp0(args[0], "cancel") == 0)) {
         if (current->form) {
             cmd_autocomplete_remove_form_fields(current->form);
         }
-
         wins_close_current();
         current = wins_get_by_recipient(room);
         if (current == NULL) {
@@ -2474,6 +2474,7 @@ cmd_rooms(gchar **args, struct cmd_help_t help)
     if (args[0] == NULL) {
         ProfAccount *account = accounts_get_account(jabber_get_account_name());
         iq_room_list_request(account->muc_service);
+        account_free(account);
     } else {
         iq_room_list_request(args[0]);
     }