From b3e59e1fb69247f99a749e3a380095928e6bdac5 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Tue, 30 Jul 2019 13:35:08 +0200 Subject: [PATCH] Fix memleak in /cmd exec --- src/xmpp/iq.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 4b75436a..93ab8553 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -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