From 2fbe4699ff718d874c739fb3e5aa2f7b0b4d4dca Mon Sep 17 00:00:00 2001 From: liaoxingxing Date: Thu, 23 Jan 2025 14:08:36 +0800 Subject: [PATCH] fix win platform memory leak Signed-off-by: liaoxingxing --- src/win/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/win/util.c b/src/win/util.c index a96cb91..ccffcaf 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; } -- Gitee