mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 23:47:25 +00:00
Fix a memory leak
This commit is contained in:
parent
4837a2d0df
commit
93e2415924
1 changed files with 1 additions and 1 deletions
|
@ -1895,7 +1895,7 @@ void complete(const wcstring &cmd, std::vector<completion_t> &comps, complete_ty
|
|||
Get the string to complete
|
||||
*/
|
||||
|
||||
current_token = wcsndup(tok_begin, cursor_pos-(tok_begin-cmd_cstr));
|
||||
current_token.assign(tok_begin, cursor_pos-(tok_begin-cmd_cstr));
|
||||
|
||||
if (prev_begin)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue