mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Fix nil dereference if storage id is nil
This commit is contained in:
parent
c4f3017f15
commit
0b1f806557
@ -259,6 +259,7 @@ func (p *criStatsProvider) makeContainerStats(
|
||||
}
|
||||
}
|
||||
storageID := stats.WritableLayer.StorageId
|
||||
if storageID != nil {
|
||||
imageFsInfo, found := uuidToFsInfo[*storageID]
|
||||
if !found {
|
||||
imageFsInfo = p.getFsInfo(storageID)
|
||||
@ -274,6 +275,7 @@ func (p *criStatsProvider) makeContainerStats(
|
||||
result.Rootfs.InodesFree = imageFsInfo.InodesFree
|
||||
result.Rootfs.Inodes = imageFsInfo.Inodes
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user