aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-01-15 11:36:13 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-16 15:43:08 +0000
commit0bc31724dc739fc8d06bbb401dd7dc0415c55490 (patch)
tree9d3f0ec98f4606dde9c2970b2a260788498c518f
parent4d70a6997c40790239138e27994fc803609ca4ec (diff)
downloadpodman-0bc31724dc739fc8d06bbb401dd7dc0415c55490.tar.gz
podman-0bc31724dc739fc8d06bbb401dd7dc0415c55490.tar.bz2
podman-0bc31724dc739fc8d06bbb401dd7dc0415c55490.zip
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
-rw-r--r--libpod/container.go1
1 files changed, 1 insertions, 0 deletions
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