about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-08-09 00:43:00 +0100
committerJames Booth <boothj5@gmail.com>2015-08-09 00:43:00 +0100
commit70c0eeed1e0a2d83449dcbec6daa19f5033470e3 (patch)
tree95ebc79a90285b811b7829849fff9515b7fd0ab1 /src/xmpp
parent783342a48ce3a3db398d4aa4a0b032bddd0a9262 (diff)
downloadprofani-tty-70c0eeed1e0a2d83449dcbec6daa19f5033470e3.tar.gz
Free error message in carbons handlers
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/iq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index ff684b60..db817e13 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -746,6 +746,7 @@ _enable_carbons_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
         char *error_message = stanza_get_error_message(stanza);
         cons_show_error("Server error enabling message carbons: %s", error_message);
         log_debug("Error enabling carbons: %s", error_message);
+        free(error_message);
     } else {
         log_debug("Message carbons enabled.");
     }
@@ -761,6 +762,7 @@ _disable_carbons_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
         char *error_message = stanza_get_error_message(stanza);
         cons_show_error("Server error disabling message carbons: %s", error_message);
         log_debug("Error disabling carbons: %s", error_message);
+        free(error_message);
     } else {
         log_debug("Message carbons disabled.");
     }