diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/win/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/win/util.c b/src/win/util.c index 1d1b2837..57061bf8 100644 --- a/src/win/util.c +++ b/src/win/util.c @@ -1016,6 +1016,7 @@ int uv_os_homedir(char* buffer, size_t* size) { int uv_os_tmpdir(char* buffer, size_t* size) { + int r; wchar_t *path; size_t len; @@ -1054,7 +1055,9 @@ int uv_os_tmpdir(char* buffer, size_t* size) { path[len] = L'\0'; } - return uv__copy_utf16_to_utf8(path, len, buffer, size); + r = uv__copy_utf16_to_utf8(path, len, buffer, size); + uv__free(path); + return r; } |