diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-06-23 17:03:06 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-06-24 09:26:03 -0400 |
commit | de75b1a2778fa08d50ecf573b3259b32b68912d7 (patch) | |
tree | 80c54e3505aae05db2c1acf4468fcc024ff6a3f5 /libpod/container_api.go | |
parent | b611ac1c50184827fa0be04a8de800e09b802705 (diff) | |
download | podman-de75b1a2778fa08d50ecf573b3259b32b68912d7.tar.gz podman-de75b1a2778fa08d50ecf573b3259b32b68912d7.tar.bz2 podman-de75b1a2778fa08d50ecf573b3259b32b68912d7.zip |
Fix a segfault in 'podman ps --sync'
We weren't properly populating the container's OCI Runtime in
Batch(), causing segfaults on attempting to access it. Add a test
to make sure we actually catch cases like this in the future.
Fixes #3411
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index ed3e08dc7..370e3e5d9 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -627,6 +627,7 @@ func (c *Container) Batch(batchFunc func(*Container) error) error { newCtr.config = c.config newCtr.state = c.state newCtr.runtime = c.runtime + newCtr.ociRuntime = c.ociRuntime newCtr.lock = c.lock newCtr.valid = true |