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 23:08:36 +0100
committerJames Booth <boothj5@gmail.com>2015-08-09 23:08:36 +0100
commit0410dd90f1393ad05858a5d42626ddb04bbdd5ad (patch)
treeb077e7b17cd1ae51e4ce32b3533b360333722575 /src/xmpp
parentdea10ecfdc01756203f30975914a1d594070aa18 (diff)
downloadprofani-tty-0410dd90f1393ad05858a5d42626ddb04bbdd5ad.tar.gz
Free timestamp and id for receipts
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/message.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index ada2d260..b7ee1018 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -581,9 +581,10 @@ _message_send_receipt(const char * const fulljid, const char * const message_id)
     xmpp_conn_t * const conn = connection_get_conn();
     xmpp_ctx_t * const ctx = connection_get_ctx();
     xmpp_stanza_t *message = xmpp_stanza_new(ctx);
-    char *id = create_unique_id("receipt");
     xmpp_stanza_set_name(message, STANZA_NAME_MESSAGE);
+    char *id = create_unique_id("receipt");
     xmpp_stanza_set_id(message, id);
+    free(id);
     xmpp_stanza_set_attribute(message, STANZA_ATTR_TO, fulljid);
 
     xmpp_stanza_t *receipt = xmpp_stanza_new(ctx);