Platform (Windows): adds comments

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
李通洲
2026-04-27 22:30:48 +08:00
parent 08b79ff4ae
commit 4eebc1b6ee
+1 -1
View File
@@ -145,7 +145,7 @@ static void getUserName(FFPlatform* platform) {
PLSA_UNICODE_STRING userName = NULL;
if (NT_SUCCESS(LsaGetUserName(&userName, NULL))) {
ffStrbufSetNWS(&platform->userName, userName->Length / sizeof(wchar_t), userName->Buffer);
RtlFreeUnicodeString(userName);
RtlFreeUnicodeString(userName); // Required. userName.Buffer is allocated separately
LsaFreeMemory(userName);
} else {
ffStrbufSetS(&platform->userName, getenv("USERNAME"));