diff --git a/src/win/util.c b/src/win/util.c index a96cb915930a30a49ba55fd7d15ea48f0b471f89..ccffcaf5ffc68d888e76a12b444df872f67c3dab 100644 --- a/src/win/util.c +++ b/src/win/util.c @@ -1001,7 +1001,9 @@ int uv_os_tmpdir(char* buffer, size_t* size) { path[len] = L'\0'; } - return uv__copy_utf16_to_utf8(path, len, buffer, size); + int rc = uv__copy_utf16_to_utf8(path, len, buffer, size); + uv__free(path); + return rc; }