about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2015-06-24 20:42:20 +0000
committerDmitry Podgorny <pasis.ua@gmail.com>2015-06-24 20:42:20 +0000
commit89b76400c8560ea5a3fd6c77cdb5782b9eb029d3 (patch)
tree5b2ba001bc48957831334200ddc69d8b31db3269
parent583bccf631320af8693544502ec883ba656369cc (diff)
downloadprofani-tty-89b76400c8560ea5a3fd6c77cdb5782b9eb029d3.tar.gz
jid: Fixed memory leak in jid_create()
-rw-r--r--src/jid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jid.c b/src/jid.c
index 172ca5b9..4eb05e87 100644
--- a/src/jid.c
+++ b/src/jid.c
@@ -91,6 +91,7 @@ jid_create(const gchar * const str)
         char *barejidraw = g_utf8_substring(trimmed, 0, g_utf8_pointer_to_offset(trimmed, slashp));
         result->barejid = g_utf8_strdown(barejidraw, -1);
         result->fulljid = g_strdup(trimmed);
+        g_free(barejidraw);
     } else {
         result->domainpart = g_strdup(domain_start);
         result->barejid = g_utf8_strdown(trimmed, -1);