Fix a memory leak

This commit is contained in:
ridiculousfish 2012-11-23 11:14:16 -08:00
parent 4837a2d0df
commit 93e2415924

View file

@ -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)
{