mirror of
https://github.com/minio/minio.git
synced 2025-04-01 10:13:42 -04:00
fix: avoid nil panic upon error in GetObjectNInfo via InnerGetObjectNInfoFn (#18198)
This commit is contained in:
parent
5b8599e52d
commit
aaab7aefbe
@ -270,6 +270,9 @@ func (c *cacheObjects) GetObjectNInfo(ctx context.Context, bucket, object string
|
|||||||
cacheReader.Close()
|
cacheReader.Close()
|
||||||
c.cacheStats.incMiss()
|
c.cacheStats.incMiss()
|
||||||
bReader, err := c.InnerGetObjectNInfoFn(ctx, bucket, object, rs, h, opts)
|
bReader, err := c.InnerGetObjectNInfoFn(ctx, bucket, object, rs, h, opts)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
bReader.ObjInfo.CacheLookupStatus = CacheHit
|
bReader.ObjInfo.CacheLookupStatus = CacheHit
|
||||||
bReader.ObjInfo.CacheStatus = CacheMiss
|
bReader.ObjInfo.CacheStatus = CacheMiss
|
||||||
return bReader, err
|
return bReader, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user