mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fixed memleak in autocompleter
This commit is contained in:
parent
e296379863
commit
b9b5d6a5f8
11
prof.supp
11
prof.supp
@ -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
|
||||
...
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user