From 0bc31724dc739fc8d06bbb401dd7dc0415c55490 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 15 Jan 2018 11:36:13 -0500 Subject: 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 Closes: #226 Approved by: rhatdan --- libpod/container.go | 1 + 1 file changed, 1 insertion(+) diff --git a/libpod/container.go b/libpod/container.go index 6b470eb4c..0731babb5 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -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 -- cgit v1.2.3-54-g00ecf