diff options
author | Shunichi Shinohara <[email protected]> | 2011-04-29 02:55:39 +0900 |
---|---|---|
committer | Shunichi Shinohara <[email protected]> | 2011-04-29 02:55:39 +0900 |
commit | 0568a0ea0f8bf115b639589f060f62d0435a956a (patch) | |
tree | b078a131967e69d1fb542c4bcd279e7e4505f07c /lib/tools/src/cover.erl | |
parent | 574de87663ecee7043df1783e7c3b830193b0399 (diff) | |
download | otp-0568a0ea0f8bf115b639589f060f62d0435a956a.tar.gz otp-0568a0ea0f8bf115b639589f060f62d0435a956a.tar.bz2 otp-0568a0ea0f8bf115b639589f060f62d0435a956a.zip |
Fix file descriptor leak
File descriptors to import cover data are left opened.
When we export and import cover data many times,
leaked descriptors cause an error.
Diffstat (limited to 'lib/tools/src/cover.erl')
-rw-r--r-- | lib/tools/src/cover.erl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 73a736f0e8..905ad895c9 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -662,6 +662,7 @@ main_process_loop(State) -> Imported = do_import_to_table(Fd,File, State#main_state.imported), reply(From, ok), + file:close(Fd), main_process_loop(State#main_state{imported=Imported}); {error,Reason} -> reply(From, {error, {cant_open_file,File,Reason}}), |