From 0781160ffb196076383afba04e1cd91fd6dcb9a9 Mon Sep 17 00:00:00 2001 From: guangwu Date: Mon, 13 May 2024 19:00:09 +0800 Subject: [PATCH] fix: close ssh config file --- tunnel/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tunnel/config.go b/tunnel/config.go index 963e124..805f814 100644 --- a/tunnel/config.go +++ b/tunnel/config.go @@ -34,6 +34,7 @@ func NewSSHConfigFile(configPath string) (*SSHConfigFile, error) { if err != nil { return nil, err } + defer f.Close() cfg, err := ssh_config.Decode(f) if err != nil {