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:
parent
5e61bc08dd
commit
b3e59e1fb6
@ -765,15 +765,22 @@ iq_submit_command_config(ProfConfWin *confwin)
|
|||||||
|
|
||||||
iq_send_stanza(iq);
|
iq_send_stanza(iq);
|
||||||
xmpp_stanza_release(iq);
|
xmpp_stanza_release(iq);
|
||||||
|
free(data->sessionid);
|
||||||
|
free(data->command);
|
||||||
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
iq_cancel_command_config(ProfConfWin *confwin)
|
iq_cancel_command_config(ProfConfWin *confwin)
|
||||||
{
|
{
|
||||||
xmpp_ctx_t * const ctx = connection_get_ctx();
|
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);
|
xmpp_stanza_t *iq = stanza_create_room_config_cancel_iq(ctx, confwin->roomjid);
|
||||||
iq_send_stanza(iq);
|
iq_send_stanza(iq);
|
||||||
xmpp_stanza_release(iq);
|
xmpp_stanza_release(iq);
|
||||||
|
free(data->sessionid);
|
||||||
|
free(data->command);
|
||||||
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user