diff options
author | James Booth <boothj5@gmail.com> | 2015-08-11 01:00:23 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-08-11 01:00:23 +0100 |
commit | 2af5c151a02f3cde69e6e0b02a79f4f439f141e1 (patch) | |
tree | 5244c086260d2c4d8ebe96904bc9ae9bbe36f42a /src/xmpp | |
parent | e2a528cad46c5da9e950831d5e9a88b8eda6c801 (diff) | |
download | profani-tty-2af5c151a02f3cde69e6e0b02a79f4f439f141e1.tar.gz |
Tidied pgp memory allocations
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/message.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } } |