diff options
author | zeripath <art27@cantab.net> | 2022-02-14 17:03:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-14 18:03:56 +0100 |
commit | 4482f62a26b5f66c1223b469b245ef8d65bae81a (patch) | |
tree | bd848527185e69855d4500c6a65a0c230764e187 /services | |
parent | 5348e198db6cd84467c99d6741715291b33598a1 (diff) | |
download | gitea-4482f62a26b5f66c1223b469b245ef8d65bae81a.tar.gz gitea-4482f62a26b5f66c1223b469b245ef8d65bae81a.zip |
Prevent dangling GetAttribute calls (#18754)
It appears possible that there could be a hang due to unread data from the
repo-attribute command pipes. This PR simply closes these during the defer.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'services')
-rw-r--r-- | services/gitdiff/gitdiff.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 017341d63f..58c25ff98f 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -1422,6 +1422,7 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff }() } defer func() { + _ = checker.Close() cancel() }() } |