Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:18
erlang
0609-snmp-Config-files-not-closed-after-reading...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0609-snmp-Config-files-not-closed-after-reading.patch of Package erlang
From 63e4695643c1e353a3a19ab9dfa169e2e8963396 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Wed, 8 Jul 2020 08:32:43 +0200 Subject: [PATCH] [snmp] Config files not closed after reading For some reason the config files where only closed if a read error occured, but not after a successful read. OTP-16760 (ERIERL-511) --- lib/snmp/src/misc/snmp_conf.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/snmp/src/misc/snmp_conf.erl b/lib/snmp/src/misc/snmp_conf.erl index 20b7af0373..223ffacd3f 100644 --- a/lib/snmp/src/misc/snmp_conf.erl +++ b/lib/snmp/src/misc/snmp_conf.erl @@ -198,8 +198,10 @@ read(File, Verify) -> read(File, Order, Check) when is_function(Order), is_function(Check) -> ?vdebug("read -> entry with~n" " File: ~p", [File]), - Fd = open_file(File), - read_fd(File, Order, Check, Fd, 1, []). + Fd = open_file(File), + Lines = read_fd(File, Order, Check, Fd, 1, []), + file:close(Fd), + Lines. read_fd(File, Order, Check, Fd, StartLine, Res) -> case do_read(Fd, "", StartLine) of -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor