From 2f4e1459e9a4072e1298a4432ab224866f0a17d0 Mon Sep 17 00:00:00 2001 From: Michael Santos Date: Fri, 21 Jun 2019 10:15:41 -0400 Subject: [PATCH] version: free stanza on error --- src/version.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c index bce9646..f1e9a00 100644 --- a/src/version.c +++ b/src/version.c @@ -34,8 +34,10 @@ int handle_version(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, xmppipe_stanza_set_type(reply, "result"); id = xmpp_stanza_get_attribute(stanza, "id"); - if (id == NULL) + if (id == NULL) { + (void)xmpp_stanza_release(reply); return 1; + } xmppipe_stanza_set_id(reply, id);