Skip to content

Commit 4cef4e8

Browse files
committed
If exception hits, make sure it's closed.
1 parent 11ef366 commit 4cef4e8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/auxiliary/analyze/jtr_linux.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ def initialize
4141
def run
4242
wordlist = Rex::Quickfile.new("jtrtmp")
4343

44-
wordlist.write( build_seed().join("\n") + "\n" )
45-
wordlist.close
44+
begin
45+
wordlist.write( build_seed().join("\n") + "\n" )
46+
ensure
47+
wordlist.close
48+
end
4649

4750
myloots = myworkspace.loots.where('ltype=?', 'linux.hashes')
4851
return if myloots.nil? or myloots.empty?

0 commit comments

Comments
 (0)