From 520ed43eae4ce7bcd8bb22cfd9cb6d138c4a4fd7 Mon Sep 17 00:00:00 2001 From: Daniel Thayer Date: Wed, 31 Aug 2016 16:30:10 -0500 Subject: [PATCH] Added another missing fclose in scan.l If someone uses an "@unload" directive in a bro script, then Bro was neglecting to close the file. --- src/scan.l | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scan.l b/src/scan.l index a026b319f5..4fd2aac1c3 100644 --- a/src/scan.l +++ b/src/scan.l @@ -90,7 +90,10 @@ static ino_t get_inode_num(const string& path) if ( ! f ) reporter->FatalError("failed to open %s\n", path.c_str()); - return get_inode_num(f, path); + ino_t inum = get_inode_num(f, path); + fclose(f); + + return inum; } class FileInfo {