win32: free allocated full path

This commit is contained in:
OV2 2018-05-24 18:22:20 +02:00
parent ba76c1c2be
commit 636ac85b85
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ extern "C" int _twopen(const char *filename, int oflag, int pmode) {
extern "C" void _twfullpath(char* dst, const char* src, int len) {
wchar_t *resolved = _wfullpath(NULL, Utf8ToWide(src), MAX_PATH);
strncpy(dst, WideToUtf8(resolved), len);
free(resolved);
dst[len - 1] = '\0';
return;
}