mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-24 20:05:13 +08:00
Fix a memory leak
This commit is contained in:
parent
4837a2d0df
commit
93e2415924
@ -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…
x
Reference in New Issue
Block a user