aboutsummaryrefslogtreecommitdiffstats
path: root/modules/util
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2024-02-25 14:05:23 +0100
committerGitHub <noreply@github.com>2024-02-25 13:05:23 +0000
commitad0a34b492c3d41952ff4648c8bfb7b54c376151 (patch)
tree3baacd6be322061bd9d53db7c61f7b82e4fa3f72 /modules/util
parent0676bf52f95b9c9ac6f5679bd263d844e6a83fa1 (diff)
downloadgitea-ad0a34b492c3d41952ff4648c8bfb7b54c376151.tar.gz
gitea-ad0a34b492c3d41952ff4648c8bfb7b54c376151.zip
Add `io.Closer` guidelines (#29387)
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Diffstat (limited to 'modules/util')
-rw-r--r--modules/util/filebuffer/file_backed_buffer.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/util/filebuffer/file_backed_buffer.go b/modules/util/filebuffer/file_backed_buffer.go
index 6b07bd0413..739543e297 100644
--- a/modules/util/filebuffer/file_backed_buffer.go
+++ b/modules/util/filebuffer/file_backed_buffer.go
@@ -149,6 +149,7 @@ func (b *FileBackedBuffer) Close() error {
if b.file != nil {
err := b.file.Close()
os.Remove(b.file.Name())
+ b.file = nil
return err
}
return nil