diff options
author | James Booth <boothj5@gmail.com> | 2014-11-01 01:48:36 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-11-01 01:48:36 +0000 |
commit | c4412fe82385945a5a056640135e9b53901d563f (patch) | |
tree | a1fc7484b7f692ac436da4a69a027b8cbacf9679 /src/command | |
parent | 51164398e3584e78628197d8c365fd79b16ac103 (diff) | |
download | profani-tty-c4412fe82385945a5a056640135e9b53901d563f.tar.gz |
Fixed various memory leaks
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 5 | ||||
-rw-r--r-- | src/command/commands.c | 7 |
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]); } |