mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	Add missed close in ServeBlobLFS (#8527)
This commit is contained in:
		
					parent
					
						
							
								31655aabfc
							
						
					
				
			
			
				commit
				
					
						e1505d6250
					
				
			
		
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -84,6 +84,11 @@ func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error {
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return err
 | 
								return err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							defer func() {
 | 
				
			||||||
 | 
								if err = lfsDataRc.Close(); err != nil {
 | 
				
			||||||
 | 
									log.Error("ServeBlobOrLFS: Close: %v", err)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}()
 | 
				
			||||||
		return ServeData(ctx, ctx.Repo.TreePath, lfsDataRc)
 | 
							return ServeData(ctx, ctx.Repo.TreePath, lfsDataRc)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue