From 5e61bc08dd677e6d69158d3fd2eaccabc104771f Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Tue, 30 Jul 2019 07:19:18 +0320 Subject: Fix command form submit Command form userdata were freed by iq_id_handler. We should now free the command ourself. --- src/xmpp/iq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 4ffa55d8..4b75436a 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1235,7 +1235,7 @@ _command_exec_response_handler(xmpp_stanza_t *const stanza, void *const userdata } else { 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); confwin_handle_configuration(confwin, form); } else if (g_strcmp0(status, "canceled") == 0) { -- cgit 1.4.1-2-gfad0