diff options
author | Hans Bolinder <[email protected]> | 2014-03-05 10:19:01 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-03-05 14:11:29 +0100 |
commit | f02afa352f14e2dc0f3be4f6854a68b14129c2ba (patch) | |
tree | 66927c3dabfa48365ce34e9c3ea9d324eb9f360b /lib/stdlib/src | |
parent | c199bd2923e7d733e60beb9bd27b3852cbb2e699 (diff) | |
download | otp-f02afa352f14e2dc0f3be4f6854a68b14129c2ba.tar.gz otp-f02afa352f14e2dc0f3be4f6854a68b14129c2ba.tar.bz2 otp-f02afa352f14e2dc0f3be4f6854a68b14129c2ba.zip |
stdlib: Fix a Dets bug with leaking file descriptors
Thanks to Hakan Mattson for reporting this bug.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/dets.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl index 44dad04f43..8c5c86f3b9 100644 --- a/lib/stdlib/src/dets.erl +++ b/lib/stdlib/src/dets.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1785,6 +1785,7 @@ read_file_header(FileName, Access, RamFile) -> Version =:= 9 -> dets_v9:read_file_header(Fd, FileName); true -> + _ = file:close(Fd), throw({error, {not_a_dets_file, FileName}}) end. |