about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-07-30 13:35:08 +0200
committerPaul Fariello <paul@fariello.eu>2019-07-30 13:35:08 +0200
commitb3e59e1fb69247f99a749e3a380095928e6bdac5 (patch)
treec9f256b40ce0c7252ae6a33b667d523aabda39f2
parent5e61bc08dd677e6d69158d3fd2eaccabc104771f (diff)
downloadprofani-tty-b3e59e1fb69247f99a749e3a380095928e6bdac5.tar.gz
Fix memleak in /cmd exec
-rw-r--r--src/xmpp/iq.c7
1 files changed, 7 insertions, 0 deletions
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