mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Make sure file handle to 'node.exe' is closed after scanning for bytes
This commit is contained in:
@@ -22,6 +22,9 @@ func SearchBytesInFile( path string, match string, limit int) bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Close file upon return
|
||||
defer file.Close()
|
||||
|
||||
// Allocate 1 byte array to perform the match
|
||||
bit := make([]byte, 1);
|
||||
j := 0
|
||||
|
||||
Reference in New Issue
Block a user