1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Fixed memleak in title bar roster_find_contact

This commit is contained in:
James Booth 2014-06-27 00:47:11 +01:00
parent 186cac34de
commit 03ffe57063

View File

@ -166,8 +166,10 @@ _title_bar_draw(void)
// show privacy // show privacy
if (current_recipient != NULL) { if (current_recipient != NULL) {
char *recipient_jid = 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); recipient_jid = roster_barejid_from_name(current_recipient);
free(found_contact);
} else { } else {
recipient_jid = current_recipient; recipient_jid = current_recipient;
} }