summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net.c b/net.c
index dc0f5de..0018de7 100644
--- a/net.c
+++ b/net.c
@@ -37,8 +37,8 @@ static long flags;
static xmpp_sm_state_t* sm_state;
-static int message_handler(xmpp_conn_t *conn, xmpp_stanza_t *stanza,
- void *userdata) {
+static int message_handler(xmpp_conn_t* conn, xmpp_stanza_t* stanza,
+ void* userdata) {
xmpp_stanza_t* body = xmpp_stanza_get_child_by_name(stanza, "body");
if (body == NULL) {
@@ -51,6 +51,8 @@ static int message_handler(xmpp_conn_t *conn, xmpp_stanza_t *stanza,
data_add_incoming_message(sender, content);
+ xmpp_free(ctx, (void*)content);
+
return 1;
}