From 70c0eeed1e0a2d83449dcbec6daa19f5033470e3 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Aug 2015 00:43:00 +0100 Subject: Free error message in carbons handlers --- src/xmpp/iq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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."); } -- cgit 1.4.1-2-gfad0