mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Fix crash on /minio/metrics/v3?list (#19745)
An unchecked map access was causing panic.
This commit is contained in:
parent
6d3e0c7db6
commit
c05ca63158
@ -105,8 +105,8 @@ func (h *metricsV3Server) listMetrics(path string) http.Handler {
|
||||
if collPath.isDescendantOf(path) {
|
||||
if v, ok := h.metricsData.mgMap[collPath]; ok {
|
||||
matchingMG[collPath] = v
|
||||
} else {
|
||||
matchingMG[collPath] = h.metricsData.bucketMGMap[collPath]
|
||||
} else if v, ok := h.metricsData.bucketMGMap[collPath]; ok {
|
||||
matchingMG[collPath] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user