Merge remote-tracking branch 'origin/topic/dnthayer/ticket1690'

* origin/topic/dnthayer/ticket1690:
  Added another missing fclose in scan.l
  Added a missing fclose in scan.l

BIT-1690 #merged
This commit is contained in:
Johanna Amann 2016-09-06 07:35:38 -07:00
commit 57da2d091b
3 changed files with 20 additions and 2 deletions

10
CHANGES
View file

@ -1,4 +1,14 @@
2.5-beta-12 | 2016-09-06 07:35:38 -0700
* Added a missing fclose in scan.l. Addresses BIT-1690.
(Daniel Thayer).
* Fix issue with file_extraction_limit event. (Seth Hall)
* Fix a crash when a user disables DCE_RPC while enabling SMB.
(Seth Hall)
2.5-beta-6 | 2016-08-19 07:50:10 -0700
* Clarify explanation of mime_entity_data event. (Moshe Kaplan)

View file

@ -1 +1 @@
2.5-beta-6
2.5-beta-12

View file

@ -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 {
@ -599,7 +602,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);