diff options
author | Dan Gudmundsson <[email protected]> | 2015-09-18 08:30:36 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-09-18 08:30:36 +0200 |
commit | 76dd921ad99aa3ef98424a2f1c4bc8de66e766e2 (patch) | |
tree | ac13f3bc1ed9a108c07f21487210aaa844841212 /lib/stdlib/src | |
parent | 803b9f8b80ca937dd5b62c594a115fc4aa554b33 (diff) | |
parent | b5fc65bb0a959bd96c125ce523c41052bbc0c04d (diff) | |
download | otp-76dd921ad99aa3ef98424a2f1c4bc8de66e766e2.tar.gz otp-76dd921ad99aa3ef98424a2f1c4bc8de66e766e2.tar.bz2 otp-76dd921ad99aa3ef98424a2f1c4bc8de66e766e2.zip |
Merge branch 'maint'
* maint:
stdlib: Fix leaking files after error_logger:logfile(close)
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/error_logger_file_h.erl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl index 48c471924e..fea1656051 100644 --- a/lib/stdlib/src/error_logger_file_h.erl +++ b/lib/stdlib/src/error_logger_file_h.erl @@ -94,14 +94,8 @@ handle_call(filename, #st{filename=File}=State) -> handle_call(_Query, State) -> {ok, {error, bad_query}, State}. -terminate(_Reason, State) -> - case State of - {Fd, _File, _Prev} -> - ok = file:close(Fd); - _ -> - ok - end, - []. +terminate(_Reason, #st{fd=Fd}) -> + file:close(Fd). code_change(_OldVsn, State, _Extra) -> {ok, State}. |