From 03ffe57063c34d2e4b79765a9cf84d0e7e3b4c4c Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 27 Jun 2014 00:47:11 +0100 Subject: [PATCH] Fixed memleak in title bar roster_find_contact --- src/ui/titlebar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }