diff options
author | James Booth <boothj5@gmail.com> | 2014-06-15 17:32:30 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-06-15 17:32:30 +0100 |
commit | b9b5d6a5f849346497f8fc89fff977a5edd352e9 (patch) | |
tree | 8a687514ccf24247f341263e913117c19bd715c4 /src | |
parent | e296379863424d50b300ca95f3b577a7e8a4ac83 (diff) | |
download | profani-tty-b9b5d6a5f849346497f8fc89fff977a5edd352e9.tar.gz |
Fixed memleak in autocompleter
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/autocomplete.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |