Make sure file handle to 'node.exe' is closed after scanning for bytes

This commit is contained in:
Ulf Jaenicke-Rößler
2017-03-13 16:49:35 +01:00
parent 5a235cad46
commit a7294e25c3

View File

@@ -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