Address GitHub feedback

- Defer registry close calls
- Ensure size parameter in GetComputerName is properly specified
- Clean up some comments to ensure correctness

Signed-off-by: Ben Ridley <benridley29@gmail.com>
This commit is contained in:
Ben Ridley
2021-03-29 10:12:20 -07:00
parent ee3848141c
commit 33c6b2c6a5
3 changed files with 7 additions and 11 deletions

View File

@@ -73,7 +73,6 @@ func netApiBufferFree(buffer *wKSTAInfo102) {
}
// NetWkstaGetInfo returns information about the configuration of a workstation.
// WARNING: The caller must call netApiBufferFree to free the memory allocated by this function.
// https://docs.microsoft.com/en-us/windows/win32/api/lmwksta/nf-lmwksta-netwkstagetinfo
func netWkstaGetInfo() (*wKSTAInfo102, uint32, error) {
var lpwi *wKSTAInfo102