diff options
author | James Booth <boothj5@gmail.com> | 2016-09-05 23:27:56 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-09-05 23:27:56 +0100 |
commit | 4647fd8a4fed432faf68de1b48d964deb01b7474 (patch) | |
tree | cac6ecadedfc8609d2c6863f17e41b9faccd4dc0 | |
parent | 77ef4de29ec72cd26833fdb5e68d79d44cdaafe5 (diff) | |
download | profani-tty-4647fd8a4fed432faf68de1b48d964deb01b7474.tar.gz |
Free stanzas on stanza_create_http_upload_request()
-rw-r--r-- | src/xmpp/stanza.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index ed7d0fce..2c4f1bd0 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -244,6 +244,8 @@ stanza_create_http_upload_request(xmpp_ctx_t *ctx, const char *const id, free(filename_cpy); xmpp_stanza_add_child(filename, filename_txt); xmpp_stanza_add_child(request, filename); + xmpp_stanza_release(filename_txt); + xmpp_stanza_release(filename); xmpp_stanza_t *size = xmpp_stanza_new(ctx); xmpp_stanza_set_name(size, STANZA_NAME_SIZE); @@ -255,6 +257,8 @@ stanza_create_http_upload_request(xmpp_ctx_t *ctx, const char *const id, } xmpp_stanza_add_child(size, size_txt); xmpp_stanza_add_child(request, size); + xmpp_stanza_release(size_txt); + xmpp_stanza_release(size); xmpp_stanza_t *content_type = xmpp_stanza_new(ctx); xmpp_stanza_set_name(content_type, STANZA_NAME_CONTENT_TYPE); @@ -262,6 +266,8 @@ stanza_create_http_upload_request(xmpp_ctx_t *ctx, const char *const id, xmpp_stanza_set_text(content_type_txt, upload->mime_type); xmpp_stanza_add_child(content_type, content_type_txt); xmpp_stanza_add_child(request, content_type); + xmpp_stanza_release(content_type_txt); + xmpp_stanza_release(content_type); xmpp_stanza_add_child(iq, request); xmpp_stanza_release(request); |