mirror of
https://github.com/minio/minio.git
synced 2025-04-18 17:55:28 -04: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 collPath.isDescendantOf(path) {
|
||||||
if v, ok := h.metricsData.mgMap[collPath]; ok {
|
if v, ok := h.metricsData.mgMap[collPath]; ok {
|
||||||
matchingMG[collPath] = v
|
matchingMG[collPath] = v
|
||||||
} else {
|
} else if v, ok := h.metricsData.bucketMGMap[collPath]; ok {
|
||||||
matchingMG[collPath] = h.metricsData.bucketMGMap[collPath]
|
matchingMG[collPath] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user