Fixed memleak in autocompleter
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user