Merge pull request #18550 from ibuildthecloud/panic

Don't dereference HostConfig.MemorySwapiness if nil
Upstream-commit: ff0e33824a09284084683d9e00f0f7bcc6950a76
Component: engine
This commit is contained in:
Brian Goff
2015-12-09 23:11:18 -05:00

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{