Merge pull request #18550 from ibuildthecloud/panic

Don't dereference HostConfig.MemorySwapiness if nil
This commit is contained in:
Brian Goff 2015-12-09 23:11:18 -05:00
commit ff0e33824a
1 changed files with 5 additions and 1 deletions

View File

@ -200,7 +200,11 @@ func (daemon *Daemon) populateCommand(c *container.Container, env []string) erro
BlkioThrottleReadBpsDevice: readBpsDevice,
BlkioThrottleWriteBpsDevice: writeBpsDevice,
OomKillDisable: c.HostConfig.OomKillDisable,
MemorySwappiness: *c.HostConfig.MemorySwappiness,
MemorySwappiness: -1,
}
if c.HostConfig.MemorySwappiness != nil {
resources.MemorySwappiness = *c.HostConfig.MemorySwappiness
}
processConfig := execdriver.ProcessConfig{