From b904793278a3241da109503f127cdb8aed8e9e34 Mon Sep 17 00:00:00 2001 From: guangwu Date: Sat, 20 Apr 2024 04:38:14 +0800 Subject: [PATCH] fix: close form file (#2416) Signed-off-by: guangwu --- x/client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/client/client.go b/x/client/client.go index 61107a05..4983c543 100644 --- a/x/client/client.go +++ b/x/client/client.go @@ -364,6 +364,7 @@ func (u *Uploader) AddFile(key, filename string) error { if err != nil { return err } + defer source.Close() return u.AddFileSource(key, filename, source) }