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

Merge pull request #1163 from paulfariello/hotfix/command-exec

Fix memleak in /cmd exec
This commit is contained in:
Michael Vetter 2019-07-30 13:50:25 +02:00 committed by GitHub
commit ad0a1efd8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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