1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-07-14 18:14:15 -04:00

Fixed memleak in autocompleter

This commit is contained in:
James Booth 2014-06-15 17:32:30 +01:00
parent e296379863
commit b9b5d6a5f8
2 changed files with 14 additions and 0 deletions

View File

@ -6,3 +6,14 @@
obj:/lib/x86_64-linux-gnu/ld-2.17.so
...
}
{
otrl_init
Memcheck:Leak
...
fun:_otr_init
fun:_init
fun:prof_run
...
}

View File

@ -162,6 +162,9 @@ autocomplete_complete(Autocomplete ac, gchar *search_str)
// first search attempt
if (ac->last_found == NULL) {
if (ac->search_str != NULL) {
FREE_SET_NULL(ac->search_str);
}
ac->search_str = strdup(search_str);
found = _search_from(ac, ac->items);
return found;