Added a missing fclose in scan.l

On OS X, Bro was failing to startup without first using the "ulimit -n"
command to increase the allowed number of open files (OS X has a much
lower default limit than Linux or FreeBSD).
This commit is contained in:
Daniel Thayer 2016-08-31 14:07:44 -05:00
parent 2cfe2c292d
commit b3a7d07e66

View file

@ -599,7 +599,12 @@ static int load_files(const char* orig_file)
ino_t i = get_inode_num(f, file_path);
if ( already_scanned(i) )
{
if ( f != stdin )
fclose(f);
return 0;
}
ScannedFile sf(i, file_stack.length(), file_path);
files_scanned.push_back(sf);