win32: free allocated full path
This commit is contained in:
parent
ba76c1c2be
commit
636ac85b85
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user