about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-06-27 00:47:11 +0100
committerJames Booth <boothj5@gmail.com>2014-06-27 00:47:11 +0100
commit03ffe57063c34d2e4b79765a9cf84d0e7e3b4c4c (patch)
tree7129ab2af0082503a789c1411c3c43364bf2ee7f
parent186cac34deb9f1469d5d2719b5a5746ff26156e2 (diff)
downloadprofani-tty-03ffe57063c34d2e4b79765a9cf84d0e7e3b4c4c.tar.gz
Fixed memleak in title bar roster_find_contact
-rw-r--r--src/ui/titlebar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index a273ea46..812eb773 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -166,8 +166,10 @@ _title_bar_draw(void)
     // show privacy
     if (current_recipient != NULL) {
         char *recipient_jid = NULL;
-        if (roster_find_contact(current_recipient) != NULL) {
+        char *found_contact = roster_find_contact(current_recipient);
+        if (found_contact != NULL) {
             recipient_jid = roster_barejid_from_name(current_recipient);
+            free(found_contact);
         } else {
             recipient_jid = current_recipient;
         }