Ensure batched containers have locks

This won't matter during batched operatins, but if the container
leaks outside of the Batch() function it will segfault if asked
to do any operation that locks unless this is applied

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #226
Approved by: rhatdan
This commit is contained in:
Matthew Heon 2018-01-15 11:36:13 -05:00 committed by Atomic Bot
parent 4d70a6997c
commit 0bc31724dc
1 changed files with 1 additions and 0 deletions

View File

@ -1547,6 +1547,7 @@ func (c *Container) Batch(batchFunc func(*Container) error) error {
newCtr.config = c.config
newCtr.state = c.state
newCtr.runtime = c.runtime
newCtr.lock = c.lock
newCtr.valid = true
newCtr.locked = true