mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +08:00
Stop leaking the result of wrealpath
This commit is contained in:
parent
f920be5ea3
commit
b0cbad84f4
|
@ -1640,8 +1640,7 @@ static void expand_home_directory(wcstring &input)
|
|||
}
|
||||
}
|
||||
|
||||
wchar_t *realhome;
|
||||
realhome = wrealpath(home, NULL);
|
||||
wchar_t *realhome = wrealpath(home, NULL);
|
||||
|
||||
if (! tilde_error && realhome)
|
||||
{
|
||||
|
@ -1651,6 +1650,7 @@ static void expand_home_directory(wcstring &input)
|
|||
{
|
||||
input[0] = L'~';
|
||||
}
|
||||
free((void *)realhome);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user