mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -1422,6 +1422,7 @@ func GetDiff(gitRepo *git.Repository, opts *DiffOptions, files ...string) (*Diff | ||||
| 				}() | ||||
| 			} | ||||
| 			defer func() { | ||||
| 				_ = checker.Close() | ||||
| 				cancel() | ||||
| 			}() | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user