Stop leaking the result of wrealpath

This commit is contained in:
ridiculousfish 2015-01-20 01:04:01 -08:00
parent f920be5ea3
commit b0cbad84f4

View File

@ -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);
}
}