about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--prof.supp11
-rw-r--r--src/tools/autocomplete.c3
2 files changed, 14 insertions, 0 deletions
diff --git a/prof.supp b/prof.supp
index bfc4bf38..8a33cdbf 100644
--- a/prof.supp
+++ b/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
+  ...
+}
+
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c
index f6d57e23..7aaf2ab5 100644
--- a/src/tools/autocomplete.c
+++ b/src/tools/autocomplete.c
@@ -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;