Fix memory leak in autocompletion (#10984)

This commit is contained in:
Fangrui Song 2018-08-07 21:14:35 -07:00 committed by Anton Kochkov
parent 800fa1b909
commit 3565137460

View File

@ -3142,6 +3142,7 @@ R_API void r_core_autocomplete_free(RCoreAutocomplete *obj) {
r_core_autocomplete_free (obj->subcmds[i]);
obj->subcmds[i] = NULL;
}
free (obj->subcmds);
free ((char*) obj->cmd);
free (obj);
}