diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-07-03 12:05:46 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-07-03 12:05:46 +0200 |
commit | 8d8ef675cd6e8d8ee756d247551d255edcea2a87 (patch) | |
tree | 112f98f889d1c7db2d68e31dda55f7f95ea08db7 | |
parent | 3640900cf64f00591526444a80d9c412ba302a0a (diff) | |
download | profani-tty-8d8ef675cd6e8d8ee756d247551d255edcea2a87.tar.gz |
handle_headline(): Free text correctly
-rw-r--r-- | src/xmpp/message.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 2464898d..65c493b6 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -112,12 +112,14 @@ _handled_by_plugin(xmpp_stanza_t *const stanza) static void _handle_headline(xmpp_stanza_t *const stanza) { + xmpp_ctx_t *ctx = connection_get_ctx(); char* text = NULL; xmpp_stanza_t *body = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_BODY); if (body) { text = xmpp_stanza_get_text(body); if (text) { cons_show("Headline: %s", text); + xmpp_free(ctx, text); } } } |