merge branch 'pr-1615'

libcontainer: intelrdt: fix a GetStats() issue

LGTMs: @crosbymichael @cyphar
Closes #1615
This commit is contained in:
Aleksa Sarai 2017-10-19 03:41:16 +11:00
commit c05f6368af
No known key found for this signature in database
GPG Key ID: 9E18AA267DDB8DB4
1 changed files with 5 additions and 0 deletions

View File

@ -443,6 +443,11 @@ func (m *IntelRdtManager) GetPath() string {
// Returns statistics for Intel RDT
func (m *IntelRdtManager) GetStats() (*Stats, error) {
// If intelRdt is not specified in config
if m.Config.IntelRdt == nil {
return nil, nil
}
m.mu.Lock()
defer m.mu.Unlock()
stats := NewStats()