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

Fix memleak in /cmd exec

This commit is contained in:
Paul Fariello 2019-07-30 13:35:08 +02:00
parent 5e61bc08dd
commit b3e59e1fb6

View File

@ -765,15 +765,22 @@ iq_submit_command_config(ProfConfWin *confwin)
iq_send_stanza(iq);
xmpp_stanza_release(iq);
free(data->sessionid);
free(data->command);
free(data);
}
void
iq_cancel_command_config(ProfConfWin *confwin)
{
xmpp_ctx_t * const ctx = connection_get_ctx();
CommandConfigData *data = (CommandConfigData *)confwin->userdata;
xmpp_stanza_t *iq = stanza_create_room_config_cancel_iq(ctx, confwin->roomjid);
iq_send_stanza(iq);
xmpp_stanza_release(iq);
free(data->sessionid);
free(data->command);
free(data);
}
static void