mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 00:02:43 +02:00
Backport #27787 by @KN4CK3R Add missing `.Close()` calls. The current code does not delete the temporary files if the data grows over 32mb. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
1 parent
9dd8f34707
commit
25acbfed36
4 files changed
+19
-1
No files matched your search
@@ -238,6 +238,8 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
|
||||
}
|
||||
|
||||
unsignedIndexContent, _ := packages_module.NewHashedBuffer()
|
||||
defer unsignedIndexContent.Close()
|
||||
|
||||
h := sha1.New()
|
||||
|
||||
if err := writeGzipStream(io.MultiWriter(unsignedIndexContent, h), "APKINDEX", buf.Bytes(), true); err != nil {
|
||||
@@ -275,6 +277,7 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
|
||||
}
|
||||
|
||||
signedIndexContent, _ := packages_module.NewHashedBuffer()
|
||||
defer signedIndexContent.Close()
|
||||
|
||||
if err := writeGzipStream(
|
||||
signedIndexContent,
|
||||
|
||||
Reference in new issue
Block a user