From 2af5c151a02f3cde69e6e0b02a79f4f439f141e1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 11 Aug 2015 01:00:23 +0100 Subject: Tidied pgp memory allocations --- src/xmpp/message.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/xmpp') diff --git a/src/xmpp/message.c b/src/xmpp/message.c index b7ee1018..a46ead5c 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -174,6 +174,7 @@ message_send_chat_pgp(const char * const barejid, const char * const msg) } else { message = stanza_create_message(ctx, id, jid, STANZA_TYPE_CHAT, msg); } + account_free(account); #else message = stanza_create_message(ctx, id, jid, STANZA_TYPE_CHAT, msg); #endif @@ -772,6 +773,7 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * con } // standard chat message, use jid without resource + xmpp_ctx_t *ctx = connection_get_ctx(); GDateTime *timestamp = stanza_get_delay(stanza); if (body) { char *message = xmpp_stanza_get_text(body); @@ -785,11 +787,11 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * con enc_message = xmpp_stanza_get_text(x); } sv_ev_incoming_message(jid->barejid, jid->resourcepart, message, enc_message); + xmpp_free(ctx, enc_message); } _receipt_request_handler(stanza); - xmpp_ctx_t *ctx = connection_get_ctx(); xmpp_free(ctx, message); } } -- cgit 1.4.1-2-gfad0