diff --git a/src/nvm/arch/arch.go b/src/nvm/arch/arch.go index b7a7f649e0f73487e3659b2bddc81fe5adfef8f5..2738c18a529340e00d4448aa00df32b4cc341630 100644 --- a/src/nvm/arch/arch.go +++ b/src/nvm/arch/arch.go @@ -34,10 +34,12 @@ func SearchBytesInFile( path string, match string, limit int) bool { if bit[0] == toMatch[j] { j++; if (j >= len(toMatch)) { + file.Close(); return true; } } } + file.Close(); return false; }