1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Fix command form submit

Command form userdata were freed by iq_id_handler.
We should now free the command ourself.
This commit is contained in:
Paul Fariello 2019-07-30 07:19:18 +03:20
parent 2592216084
commit 5e61bc08dd

View File

@ -1235,7 +1235,7 @@ _command_exec_response_handler(xmpp_stanza_t *const stanza, void *const userdata
} else { } else {
data->sessionid = strdup(sessionid); data->sessionid = strdup(sessionid);
} }
data->command = command; data->command = strdup(command);
ProfConfWin *confwin = (ProfConfWin*)wins_new_config(from, form, iq_submit_command_config, iq_cancel_command_config, data); ProfConfWin *confwin = (ProfConfWin*)wins_new_config(from, form, iq_submit_command_config, iq_cancel_command_config, data);
confwin_handle_configuration(confwin, form); confwin_handle_configuration(confwin, form);
} else if (g_strcmp0(status, "canceled") == 0) { } else if (g_strcmp0(status, "canceled") == 0) {