diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/autocomplete.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 8426de85..5c70f874 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> +#include "common.h" #include "tools/autocomplete.h" #include "tools/parser.h" @@ -59,10 +60,7 @@ void autocomplete_reset(Autocomplete ac) { ac->last_found = NULL; - if (ac->search_str != NULL) { - free(ac->search_str); - ac->search_str = NULL; - } + FREE_SET_NULL(ac->search_str); } void |