Merge pull request #954 from ijc25/copy-bolt-db-slices

Copy byte slices contained in bolt db objects
This commit is contained in:
Derek McGowan 2017-06-06 11:21:02 -07:00 committed by GitHub
commit 3e0c50c2c9

View File

@ -124,7 +124,8 @@ func readContainer(container *containers.Container, bkt *bolt.Bucket) error {
case string(bucketKeyRuntime):
container.Runtime = string(v)
case string(bucketKeySpec):
container.Spec = v
container.Spec = make([]byte, len(v))
copy(container.Spec, v)
case string(bucketKeyRootFS):
container.RootFS = string(v)
case string(bucketKeyCreatedAt):