Commit 0b1f8065 authored by David Porter's avatar David Porter

Fix nil dereference if storage id is nil

parent c4f3017f
...@@ -259,6 +259,7 @@ func (p *criStatsProvider) makeContainerStats( ...@@ -259,6 +259,7 @@ func (p *criStatsProvider) makeContainerStats(
} }
} }
storageID := stats.WritableLayer.StorageId storageID := stats.WritableLayer.StorageId
if storageID != nil {
imageFsInfo, found := uuidToFsInfo[*storageID] imageFsInfo, found := uuidToFsInfo[*storageID]
if !found { if !found {
imageFsInfo = p.getFsInfo(storageID) imageFsInfo = p.getFsInfo(storageID)
...@@ -274,6 +275,7 @@ func (p *criStatsProvider) makeContainerStats( ...@@ -274,6 +275,7 @@ func (p *criStatsProvider) makeContainerStats(
result.Rootfs.InodesFree = imageFsInfo.InodesFree result.Rootfs.InodesFree = imageFsInfo.InodesFree
result.Rootfs.Inodes = imageFsInfo.Inodes result.Rootfs.Inodes = imageFsInfo.Inodes
} }
}
return result return result
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment