From eec5451a5e3a54c3f46c301beec11d9d9c17cbc5 Mon Sep 17 00:00:00 2001 From: Fionera Date: Mon, 11 Mar 2024 01:44:24 +0100 Subject: [PATCH] fix: remove config file fd leak I don't know why I didn't just close it after leaving the function. There is no other use of the fd... --- config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/config.go b/config.go index 4a42c3b..573c74c 100644 --- a/config.go +++ b/config.go @@ -18,6 +18,7 @@ func readConfig() (*config, error) { if err != nil { return nil, err } + defer open.Close() d := yaml.NewDecoder(open) d.KnownFields(true)